Pick an online or physical network (choose one with ~1k-10k nodes). See Datasets (Module 1). Submit code or link of code.
Provide a good visualization of your network.
Find the characteristics of your network (centralities).
Answer additional questions:
- How does your network cluster?
- What structural properties can you detect?
- How many of these relations would you consider “strong”?
Some ideas: #Nodes, #Edges, Diameter, Isolated nodes, Density, Max degree, Min degree, Average degree, Size of largest components, Number of connected components, degree of assortativity etc.
Link : roadNet-CA.txt
Dataset consists of network of roads in California. It is an undirected graph (one way roads are avoided).
Nodes represent the Intersections and endpoints of roads.
Edges represent road intersections.
Only first N lines in the txt file of dataset are used for this activity

import networkx as nx
import matplotlib.pyplot as plt
import pandas as pd
import networkx.algorithms.community as nxcom
# Importing data (Only first N lines in the txt file of dataset are used for this activity)
# Read the space-separated text file
with open('roadNet-CA.txt', 'r') as file:
lines = file.readlines()
N = 3000
lines = lines[:N]
# printing the last line mentioned in the txt file of dataset
lines[-1]
'12608\t12604\n'
# Initialize a graph
"""
There are errors while parsing the txt file due to newlines , tabs , whitespaces etc.
In such cases a ValueError is raised.
The output of this cell returns the line in txt file that raises the ValueError.
"""
G = nx.Graph()
try :
for idx, line in enumerate(lines):
# Split space-separated values
node1, node2 = map(int, line.rstrip().split("\t"))
G.add_edge(node1, node2)
except ValueError :
print("Exception occured at : ",node1 , node2)
pos = nx.spring_layout(G, k=0.1)
nx.draw_networkx(
G, pos=pos, node_size=0, edge_color="#333333", alpha=0.05, with_labels=False)
plt.figure(figsize=(40,28))
nx.draw(G, pos = nx.nx_pydot.graphviz_layout(G), node_size=1200, node_color='lightblue', linewidths=0.25,font_size=10, with_labels=True)
plt.show()
communities = sorted(nxcom.greedy_modularity_communities(G), key=len, reverse=True)
len(communities)
44
def set_node_community(G, communities):
'''Add community to node attributes'''
for c, v_c in enumerate(communities):
for v in v_c:
# Add 1 to save 0 for external edges
G.nodes[v]['community'] = c + 1
def set_edge_community(G):
'''Find internal edges and add their community to their attributes'''
for v, w, in G.edges:
if G.nodes[v]['community'] == G.nodes[w]['community']:
# Internal edge, mark with community
G.edges[v, w]['community'] = G.nodes[v]['community']
else:
# External edge, mark as 0
G.edges[v, w]['community'] = 0
def get_color(i, r_off=1, g_off=1, b_off=1):
r0, g0, b0 = 0, 0, 0
n = 16
low, high = 0.1, 0.9
span = high - low
r = low + span * (((i + r_off) * 3) % n) / (n - 1)
g = low + span * (((i + g_off) * 5) % n) / (n - 1)
b = low + span * (((i + b_off) * 7) % n) / (n - 1)
return (r, g, b)
# Set node and edge communities
set_node_community(G, communities)
set_edge_community(G)
# Set community color for internal edges
external = [(v, w) for v, w in G.edges if G.edges[v, w]['community'] == 0]
internal = [(v, w) for v, w in G.edges if G.edges[v, w]['community'] > 0]
internal_color = [get_color(G.edges[e]['community']) for e in internal]
# Draw external edges
nx.draw_networkx(
G, pos=pos, node_size=0, edgelist=external, edge_color="#333333",
alpha=0.2, with_labels=False)
# Draw internal edges
nx.draw_networkx(
G, pos=pos, node_size=0, edgelist=internal, edge_color=internal_color,
alpha=0.05, with_labels=False)
# Now G contains the filtered graph. You can print or visualize it.
print("Nodes:", G.nodes())
print("Edges:", G.edges())
print(f"Total number of nodes : {len(G.nodes())}")
print(f"Total number of edges : {len(G.edges())}")
Nodes: [0, 1, 2, 469, 6, 385, 3, 380, 37415, 5, 384, 386, 4, 419, 422, 98, 420, 35698, 183, 423, 470, 35729, 35709, 7, 8, 9, 79, 33, 10, 84, 78, 119, 32, 34, 11, 110, 83, 85, 12, 111, 112, 13, 95, 108, 14, 94, 109, 113, 123, 96, 15, 16, 77, 93, 17, 18, 3254, 19, 3255, 36971, 20, 23, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 3247, 3253, 35943, 3246, 3248, 3249, 3204, 35950, 2203, 3252, 3257, 2146, 2204, 35, 36, 50, 1199, 37, 35885, 1645159, 49, 185, 1198, 1205, 38, 1641586, 35884, 1645157, 1645156, 1648644, 39, 1633418, 40, 1641587, 41, 1641577, 1641576, 1641606, 42, 1641355, 1641363, 43, 1639779, 1628954, 1639780, 44, 45, 1542024, 46, 1154, 1538392, 1542023, 1639781, 47, 27108, 27325, 1153, 1155, 1538362, 1538390, 1538391, 48, 27107, 27250, 27323, 27335, 27343, 184, 27342, 35887, 39411, 35886, 52, 53, 54, 4152, 223, 225, 4120, 4148, 4153, 4156, 224, 3937, 4113, 4114, 4154, 55, 56, 57, 1068, 1099, 76, 1069, 58, 1071, 1072, 1096, 1116, 36235, 74, 1075, 59, 1089, 32419, 1070, 1098, 1110, 60, 61, 62, 171, 172, 63, 64, 339, 65, 2220, 338, 341, 36187, 66, 2155, 2157, 2219, 2221, 67, 68, 2254, 2156, 2158, 2161, 69, 70, 2251, 2252, 71, 1052, 72, 1049, 1050, 2256, 2258, 73, 1048, 75, 1073, 1076, 80, 455, 81, 105, 454, 116, 118, 342, 82, 104, 107, 124, 114, 86, 87, 88, 128, 315, 97, 134, 89, 146, 129, 452, 135, 316, 90, 91, 92, 133, 132, 139, 410, 471, 35881, 35728, 99, 100, 101, 136, 6790, 103, 137, 6760, 102, 6771, 421, 6792, 6805, 6791, 6802, 6713, 6748, 6764, 6757, 6733, 6738, 6772, 6722, 6734, 6736, 6737, 6765, 6711, 6714, 6717, 6747, 6759, 106, 151, 150, 152, 115, 117, 120, 169, 122, 121, 170, 36184, 453, 340, 36185, 125, 126, 127, 176, 355, 383, 354, 353, 443, 381, 153, 155, 37498, 356, 358, 442, 130, 154, 444, 145, 41762, 131, 359, 36966, 41761, 138, 387, 6770, 6793, 6797, 6763, 6766, 388, 140, 141, 142, 391, 389, 392, 390, 143, 144, 177, 178, 186, 187, 41763, 147, 148, 149, 166, 167, 168, 317, 162, 36963, 303, 318, 357, 156, 157, 158, 1057, 175, 1093, 159, 1058, 173, 160, 1056, 161, 36965, 1055, 36964, 163, 164, 165, 174, 314, 179, 180, 181, 425, 42066, 379, 434, 182, 426, 35695, 424, 42067, 42074, 435, 460, 42076, 35699, 35696, 35703, 35746, 35890, 35891, 35892, 35895, 312, 41764, 188, 189, 190, 369, 191, 193, 351, 367, 368, 441, 360, 440, 192, 195, 461, 350, 371, 194, 201, 203, 375, 202, 352, 462, 373, 374, 42079, 196, 197, 198, 7178, 200, 23401, 199, 15697, 7176, 7179, 503, 24015, 7332, 15686, 205, 372, 204, 206, 213, 209, 207, 433, 211, 212, 208, 344, 432, 260, 343, 210, 235, 227, 230, 236, 41752, 370, 41755, 229, 261, 226, 234, 214, 215, 216, 309, 308, 310, 311, 313, 307, 36178, 217, 218, 222, 7925, 219, 7923, 221, 4895, 4899, 7926, 220, 7922, 7924, 7931, 7921, 7901, 7918, 7932, 7937, 7881, 7888, 7882, 7887, 4896, 4898, 7927, 43222, 4109, 4110, 3940, 3938, 4100, 4096, 4099, 4117, 4149, 228, 251, 255, 273, 233, 254, 259, 42078, 231, 232, 289, 245, 276, 288, 250, 244, 246, 247, 274, 275, 277, 278, 41753, 41754, 243, 248, 237, 238, 239, 3930, 241, 3295, 240, 3271, 3889, 3931, 3292, 3296, 4080, 3276, 3272, 3888, 3890, 3275, 3277, 3291, 242, 36218, 253, 249, 36219, 252, 1159, 1158, 256, 257, 258, 272, 35850, 42587, 271, 35851, 36974, 42588, 42586, 36975, 42077, 262, 263, 264, 549, 550, 265, 267, 548, 279, 36211, 525, 36210, 266, 268, 1918, 269, 290, 297, 1919, 36987, 270, 42585, 291, 327, 1920, 296, 42583, 301, 42582, 280, 281, 282, 35769, 285, 42598, 283, 286, 35773, 35768, 35852, 284, 35845, 35846, 35841, 35854, 42600, 287, 35772, 35775, 35847, 35844, 35771, 35774, 42570, 35848, 36212, 36215, 292, 293, 480, 294, 35805, 479, 295, 35795, 35796, 35797, 35799, 35770, 42584, 298, 299, 300, 35863, 302, 304, 305, 1092, 306, 1103, 1156, 1090, 1100, 1143, 1101, 1124, 1157, 1165, 319, 320, 321, 322, 323, 326, 3481, 324, 325, 3479, 3430, 3432, 4173, 4175, 3434, 3431, 3475, 3480, 4181, 3482, 3369, 3429, 3415, 3427, 3416, 3474, 3476, 3424, 4178, 4174, 4179, 4182, 4132, 36979, 36980, 328, 329, 330, 40094, 11435, 12041, 11433, 11434, 12022, 12058, 331, 332, 333, 35734, 404, 36967, 35731, 35735, 405, 334, 335, 337, 336, 12138, 12176, 12175, 12202, 12032, 12033, 36186, 2202, 42082, 42081, 42594, 42595, 345, 346, 347, 3294, 349, 3290, 3338, 348, 3285, 3339, 3293, 3319, 3284, 3286, 3314, 3340, 3347, 36261, 382, 361, 362, 363, 41760, 364, 41759, 365, 366, 41758, 41756, 41757, 42597, 376, 377, 378, 16472, 12226, 12227, 12230, 12247, 1176, 37523, 12225, 16399, 12228, 12229, 12231, 12248, 37522, 393, 468, 394, 395, 396, 7162, 399, 42094, 397, 7163, 7184, 7186, 398, 457, 42329, 3263, 3261, 3264, 21184, 3262, 20839, 456, 459, 20849, 41945, 400, 401, 403, 592, 402, 41613, 450, 591, 2661, 445, 2625, 42211, 446, 40748, 449, 451, 411, 472, 36193, 406, 407, 408, 6024, 409, 6025, 36209, 6300, 6048, 5636, 6301, 6049, 36224, 6302, 5637, 5638, 473, 35717, 412, 413, 414, 683, 418, 755, 7795, 415, 682, 677, 699, 417, 7794, 756, 758, 7793, 7792, 416, 681, 1025, 1024, 7757, 1023, 7756, 7755, 7787, 35405, 35710, 6769, 6794, 6798, 427, 35747, 42052, 35748, 35749, 42058, 42053, 42054, 428, 429, 430, 7190, 40005, 431, 12629, 40022, 5927, 5970, 611, 7156, 40006, 5925, 6855, 40015, 40017, 40023, 5928, 5929, 5971, 7130, 5926, 436, 437, 439, 23898, 438, 33468, 20655, 23896, 23897, 40853, 15713, 33467, 33469, 39690, 39962, 15712, 15714, 40848, 39978, 447, 2648, 40749, 42208, 448, 2647, 2649, 2646, 2934, 2938, 2652, 458, 21970, 20811, 20812, 21121, 20869, 21969, 20848, 21122, 41944, 42092, 20813, 20772, 20803, 42073, 42596, 463, 464, 467, 20571, 465, 5314, 5315, 466, 20718, 25505, 20572, 20576, 20725, 40105, 41916, 5312, 42134, 5313, 41917, 40104, 40110, 20554, 20716, 20723, 20534, 20556, 35739, 474, 475, 476, 1594983, 478, 477, 36977, 36986, 1594984, 1610675, 36978, 1594985, 35803, 36976, 35800, 35809, 35818, 481, 482, 507, 483, 506, 21548, 484, 4074, 5805, 485, 4040, 4041, 5937, 486, 4039, 487, 5809, 488, 489, 5807, 5943, 490, 5808, 491, 5951, 492, 4077, 5948, 493, 4076, 4075, 5954, 494, 7131, 5813, 495, 7133, 7132, 7152, 496, 7154, 497, 7145, 7153, 7161, 7206, 498, 7142, 7146, 7207, 499, 7141, 500, 501, 502, 7164, 7165, 23431, 7144, 7166, 7180, 504, 505, 4044, 24013, 24012, 21549, 24014, 509, 510, 511, 6685, 513, 6681, 512, 6684, 6696, 6679, 6699, 6616, 6621, 6682, 6604, 6683, 6700, 6963, 6953, 6605, 6606, 6620, 6893, 514, 515, 516, 1119, 5892, 1120, 5883, 5884, 5894, 1118, 5890, 5896, 5902, 5874, 5882, 5893, 5862, 5854, 5864, 517, 518, 519, 8146, 520, 8154, 8155, 8145, 8153, 8137, 8147, 8156, 8152, 8157, 8124, 8148, 8151, 521, 522, 36982, 36992, 523, 36983, 36991, 36993, 524, 526, 36201, 1166, 36200, 36202, 1167, 527, 528, 529, 532, 531, 534, 5432, 530, 5418, 533, 5444, 5449, 5421, 5422, 535, 5433, 5438, 5423, 5368, 5417, 5424, 5367, 5391, 5420, 5450, 5445, 5448, 5443, 5437, 5442, 7984, 5431, 5436, 5447, 536, 537, 541, 542, 538, 36981, 540, 543, 539, 36985, 1603443, 1603442, 36984, 1607299, 1594982, 1607298, 1593601, 544, 545, 546, 4371, 4373, 547, 4481, 4372, 4476, 4487, 4485, 4480, 4484, 551, 552, 553, 559, 555, 556, 554, 36197, 558, 560, 557, 1189, 36196, 36207, 561, 1187, 1190, 568, 2023, 2025, 37003, 2024, 37015, 37004, 37005, 573, 562, 563, 566, 567, 564, 37017, 565, 569, 37020, 37016, 37018, 37019, 579, 577, 578, 570, 571, 572, 589, 574, 580, 575, 587, 576, 588, 590, 581, 582, 583, 22099, 586, 584, 22098, 21926, 585, 944, 21927, 22151, 22105, 22107, 22113, 31944, 22108, 17398, 22106, 2575, 2653, 2935, 2660, 2671, 593, 596, 594, 595, 36021, 36020, 36017, 36022, 597, 598, 599, 6851, 7251, 7066, 6859, 6007, 7261, 7250, 7263, 7068, 7351, 6858, 7067, 600, 601, 603, 663, 3470, 602, 3484, 3498, 664, 665, 3469, 3473, 3494, 3452, 3478, 3497, 3504, 3453, 3439, 3451, 604, 605, 606, 676, 36183, 608, 607, 41826, 675, 695, 36179, 36182, 36190, 673, 41825, 41892, 672, 674, 692, 609, 610, 614, 40021, 6013, 613, 40010, 40020, 612, 7188, 6012, 6014, 40004, 7189, 7192, 40009, 615, 616, 617, 1494580, 624, 661, 618, 1494584, 623, 662, 109371, 619, 37031, 620, 36225, 37030, 37033, 1494587, 621, 836, 834, 622, 768, 109373, 109372, 139985, 625, 626, 648, 12653, 627, 639, 12794, 12654, 12655, 628, 629, 630, 12608, 631, 12604] Edges: [(0, 1), (0, 2), (0, 469), (1, 6), (1, 385), (2, 3), (469, 380), (469, 37415), (6, 5), (385, 384), (385, 386), (3, 4), (3, 419), (3, 422), (380, 183), (380, 379), (37415, 422), (5, 4), (5, 98), (384, 383), (384, 468), (386, 387), (386, 331), (386, 36967), (4, 98), (4, 420), (419, 420), (419, 35698), (422, 183), (422, 423), (98, 470), (98, 35729), (420, 35709), (35698, 423), (35698, 35405), (35698, 35709), (183, 180), (183, 182), (423, 182), (470, 410), (470, 471), (470, 35881), (35729, 35728), (35729, 35881), (35709, 35710), (7, 8), (7, 9), (7, 79), (8, 33), (9, 10), (9, 84), (79, 78), (79, 119), (33, 32), (33, 34), (10, 11), (10, 84), (10, 110), (84, 83), (84, 85), (78, 80), (78, 455), (119, 116), (119, 118), (119, 342), (32, 31), (32, 2203), (11, 12), (11, 110), (110, 111), (110, 112), (83, 82), (83, 112), (12, 13), (12, 95), (12, 108), (111, 112), (111, 109), (112, 114), (13, 14), (13, 94), (13, 95), (95, 96), (108, 109), (108, 113), (108, 123), (14, 15), (14, 16), (14, 77), (94, 77), (94, 93), (109, 113), (113, 82), (123, 97), (123, 124), (96, 97), (16, 17), (77, 17), (93, 92), (93, 133), (17, 18), (17, 3254), (18, 19), (18, 3254), (3254, 3255), (3254, 36971), (19, 20), (19, 23), (3255, 29), (3255, 3253), (3255, 35943), (20, 21), (20, 22), (23, 24), (23, 25), (25, 26), (25, 27), (27, 28), (27, 29), (29, 30), (30, 31), (30, 3247), (30, 3253), (31, 3246), (3247, 3248), (3247, 3249), (3253, 3204), (3253, 35950), (3246, 2203), (3246, 3252), (3246, 3257), (2203, 2146), (2203, 2204), (35, 36), (35, 50), (35, 1199), (36, 37), (36, 35885), (36, 1645159), (50, 49), (50, 185), (1199, 1198), (1199, 1205), (37, 38), (37, 1641586), (35885, 35884), (35885, 1645157), (1645159, 1645156), (1645159, 1645157), (1645159, 1648644), (49, 48), (49, 184), (185, 184), (185, 1198), (1198, 1205), (1198, 35895), (38, 39), (38, 1641586), (1641586, 1633418), (39, 40), (39, 1641587), (1633418, 1641587), (40, 41), (40, 1641577), (1641587, 1641576), (1641587, 1641606), (41, 42), (41, 1641355), (1641577, 1641363), (1641577, 1641576), (42, 43), (42, 1639779), (1641355, 1628954), (1641355, 1639780), (1641355, 1641363), (43, 44), (43, 1639779), (1639779, 1639780), (44, 45), (44, 1542024), (45, 46), (45, 1154), (45, 1538392), (1542024, 1542023), (1542024, 1639781), (46, 47), (46, 27108), (46, 27325), (1154, 1153), (1154, 1155), (1538392, 1538362), (1538392, 1538390), (1538392, 1538391), (47, 48), (47, 27325), (27108, 27107), (27108, 27250), (27325, 27323), (27325, 27335), (48, 27343), (27343, 27342), (27343, 35887), (27343, 39411), (184, 35886), (35886, 35890), (35886, 35891), (35886, 35892), (52, 53), (52, 54), (52, 4152), (53, 54), (53, 223), (53, 225), (54, 4120), (4152, 4148), (4152, 4153), (4152, 4156), (223, 224), (223, 3937), (223, 4113), (225, 224), (225, 4114), (225, 4148), (4120, 3937), (4120, 4153), (4120, 4154), (4148, 4117), (4148, 4149), (224, 4109), (224, 4110), (3937, 3938), (3937, 3940), (4113, 3940), (4113, 4110), (4114, 4109), (4114, 4099), (4114, 4117), (55, 56), (55, 57), (55, 1068), (55, 1099), (56, 76), (56, 1069), (57, 58), (57, 1071), (57, 1072), (1068, 1069), (1068, 1096), (1068, 1116), (1068, 36235), (76, 74), (76, 1075), (1069, 1116), (58, 59), (58, 1089), (58, 32419), (1071, 1070), (1071, 1098), (1071, 1110), (1072, 1070), (1072, 32419), (74, 72), (74, 75), (1075, 1073), (1075, 1076), (59, 60), (59, 61), (59, 62), (1089, 62), (1089, 171), (1089, 172), (1070, 1093), (62, 63), (171, 120), (171, 121), (171, 172), (172, 173), (63, 64), (63, 339), (64, 65), (64, 2220), (339, 338), (339, 341), (339, 36187), (65, 66), (65, 2155), (65, 2157), (2220, 2219), (2220, 2221), (338, 342), (338, 340), (338, 36186), (341, 340), (341, 2202), (66, 67), (66, 68), (66, 2254), (2155, 2156), (2155, 2254), (2157, 2158), (2157, 2161), (2157, 2219), (68, 69), (68, 70), (68, 2251), (2254, 2252), (70, 71), (70, 1052), (70, 2251), (2251, 2252), (71, 72), (71, 1049), (1052, 1050), (1052, 2256), (1052, 2258), (72, 73), (1049, 1048), (1049, 1050), (80, 81), (455, 105), (455, 454), (81, 82), (81, 104), (105, 104), (105, 106), (454, 151), (454, 117), (454, 453), (116, 115), (116, 122), (118, 117), (118, 453), (342, 340), (342, 36185), (104, 107), (104, 124), (107, 106), (107, 124), (107, 135), (86, 87), (86, 88), (86, 128), (86, 315), (87, 97), (87, 134), (88, 89), (88, 128), (128, 129), (128, 452), (315, 146), (97, 134), (134, 135), (134, 316), (89, 90), (89, 91), (146, 143), (146, 145), (129, 130), (129, 154), (129, 444), (452, 145), (452, 41762), (135, 106), (135, 316), (316, 150), (91, 92), (133, 132), (133, 139), (132, 130), (132, 138), (139, 138), (139, 387), (410, 405), (410, 411), (410, 472), (471, 472), (35881, 35739), (99, 100), (99, 101), (99, 136), (99, 6790), (100, 103), (100, 137), (100, 6760), (101, 102), (101, 6771), (101, 6790), (136, 137), (136, 421), (136, 6792), (136, 6805), (6790, 6791), (6790, 6792), (6790, 6802), (103, 102), (103, 6713), (103, 6748), (137, 421), (137, 6764), (6760, 6748), (6760, 6757), (6760, 6764), (102, 6733), (102, 6738), (6771, 6738), (6771, 6772), (6771, 6791), (421, 6770), (421, 6793), (6792, 6802), (6792, 6805), (6805, 6793), (6805, 6797), (6713, 6711), (6713, 6714), (6713, 6717), (6713, 6734), (6748, 6747), (6748, 6759), (6764, 6763), (6764, 6766), (6733, 6722), (6733, 6734), (6733, 6736), (6738, 6736), (6738, 6737), (6738, 6765), (6738, 6772), (106, 151), (151, 150), (151, 152), (150, 149), (152, 169), (152, 148), (115, 117), (115, 120), (115, 169), (117, 169), (120, 121), (120, 170), (122, 121), (122, 36184), (125, 126), (125, 127), (125, 176), (125, 355), (125, 383), (126, 127), (126, 176), (126, 354), (127, 353), (127, 443), (176, 153), (176, 155), (355, 381), (383, 381), (383, 37498), (354, 153), (354, 353), (353, 356), (353, 358), (443, 442), (381, 382), (153, 154), (153, 155), (155, 138), (37498, 468), (356, 154), (356, 357), (356, 359), (358, 189), (358, 440), (442, 441), (442, 468), (130, 131), (130, 154), (444, 359), (444, 36966), (444, 41761), (145, 144), (145, 41763), (359, 360), (359, 361), (36966, 361), (387, 388), (6770, 6769), (6770, 6793), (6793, 6794), (6793, 6798), (388, 141), (388, 392), (140, 141), (140, 142), (140, 391), (141, 142), (142, 389), (391, 389), (389, 390), (392, 382), (392, 393), (143, 144), (143, 177), (144, 178), (144, 186), (177, 178), (177, 187), (178, 186), (186, 187), (187, 314), (147, 148), (147, 149), (147, 166), (147, 167), (148, 168), (149, 317), (166, 162), (166, 36963), (317, 303), (317, 318), (162, 161), (162, 163), (303, 1056), (303, 302), (303, 1092), (357, 189), (357, 360), (156, 157), (156, 158), (156, 1057), (157, 175), (157, 1093), (158, 159), (158, 1057), (1057, 1058), (175, 173), (175, 1093), (159, 160), (159, 1056), (173, 174), (160, 161), (160, 36965), (1056, 1055), (161, 36964), (163, 164), (163, 165), (314, 312), (314, 41764), (179, 180), (179, 181), (179, 425), (179, 42066), (180, 379), (180, 434), (181, 182), (181, 426), (181, 35695), (425, 424), (425, 426), (425, 42066), (42066, 42067), (42066, 42074), (379, 435), (434, 435), (434, 460), (434, 42076), (182, 35699), (426, 424), (426, 35746), (35695, 35696), (35695, 35703), (35695, 35746), (424, 427), (42067, 42052), (42074, 460), (42074, 42073), (42074, 42596), (435, 461), (460, 375), (460, 42079), (35703, 35746), (312, 215), (312, 313), (188, 189), (188, 190), (188, 369), (189, 191), (190, 191), (190, 193), (190, 351), (369, 367), (369, 368), (191, 441), (193, 192), (193, 195), (193, 461), (351, 350), (351, 371), (367, 366), (367, 368), (441, 440), (360, 362), (192, 194), (192, 201), (195, 194), (195, 462), (461, 462), (350, 352), (350, 211), (371, 211), (371, 370), (371, 41755), (194, 203), (194, 375), (201, 202), (201, 352), (203, 202), (203, 373), (375, 374), (375, 42079), (352, 373), (373, 205), (373, 372), (374, 205), (374, 209), (374, 42079), (42079, 42597), (196, 197), (196, 198), (196, 7178), (197, 200), (197, 23401), (198, 199), (198, 15697), (7178, 7176), (7178, 7179), (200, 199), (23401, 503), (23401, 24015), (15697, 7332), (15697, 15686), (7179, 502), (7179, 7180), (503, 502), (503, 504), (205, 204), (205, 209), (372, 204), (372, 213), (204, 206), (204, 213), (206, 207), (206, 433), (213, 211), (213, 212), (209, 208), (209, 344), (207, 208), (207, 432), (211, 210), (212, 210), (212, 227), (212, 230), (208, 344), (208, 432), (344, 343), (432, 260), (432, 343), (260, 230), (260, 259), (260, 42078), (343, 42082), (210, 235), (235, 236), (235, 41752), (227, 226), (227, 234), (230, 229), (230, 261), (236, 232), (236, 250), (41752, 41753), (41752, 41754), (370, 363), (370, 366), (370, 41758), (41755, 41756), (41755, 41757), (229, 228), (229, 255), (226, 228), (226, 251), (234, 251), (234, 233), (214, 215), (214, 216), (214, 309), (215, 216), (216, 308), (309, 310), (309, 311), (308, 307), (308, 36178), (307, 1159), (307, 306), (36178, 242), (36178, 253), (217, 218), (217, 222), (217, 7925), (218, 219), (218, 7923), (222, 221), (222, 4895), (222, 4899), (222, 7926), (219, 220), (219, 7922), (7923, 7922), (7923, 7924), (221, 220), (221, 7901), (221, 7918), (4895, 7918), (4895, 4896), (4899, 4898), (4899, 7926), (7926, 7927), (7926, 43222), (220, 7931), (7922, 7921), (7931, 7932), (7931, 7937), (7901, 7881), (7901, 7888), (7901, 7932), (7918, 7882), (7918, 7887), (4109, 4100), (4110, 4096), (228, 255), (251, 273), (255, 254), (273, 233), (273, 274), (273, 275), (233, 231), (233, 276), (254, 256), (259, 258), (259, 35851), (259, 42078), (42078, 42077), (231, 232), (231, 289), (232, 245), (289, 276), (289, 288), (245, 244), (245, 246), (245, 247), (276, 277), (276, 278), (288, 263), (288, 36211), (250, 243), (250, 247), (250, 248), (244, 242), (244, 36218), (247, 248), (278, 263), (278, 279), (243, 242), (243, 248), (248, 249), (237, 238), (237, 239), (237, 3930), (238, 239), (238, 241), (238, 3295), (239, 240), (239, 3271), (239, 3889), (3930, 3889), (3930, 3931), (241, 240), (241, 3292), (3295, 3296), (3295, 4080), (240, 3276), (3271, 3272), (3271, 3888), (3889, 3890), (3292, 3276), (3292, 3291), (3296, 3291), (3296, 3338), (3276, 3275), (3276, 3277), (3291, 346), (36218, 36219), (253, 252), (252, 1159), (1159, 1158), (1158, 306), (1158, 1157), (256, 257), (257, 258), (257, 272), (258, 35850), (258, 42587), (272, 271), (272, 42587), (35850, 35851), (35850, 36974), (35850, 42588), (42587, 42586), (271, 270), (271, 301), (35851, 36974), (35851, 36975), (36974, 35863), (42586, 299), (42586, 42582), (262, 263), (262, 264), (262, 549), (263, 550), (264, 265), (264, 267), (549, 548), (550, 525), (550, 36210), (265, 266), (267, 268), (267, 1918), (548, 522), (36211, 36212), (36211, 36215), (525, 523), (525, 526), (268, 269), (268, 290), (268, 297), (1918, 1919), (1918, 36987), (269, 270), (269, 42585), (290, 291), (290, 327), (290, 1920), (297, 296), (297, 42583), (1919, 327), (1919, 36979), (1919, 36980), (270, 301), (291, 292), (291, 327), (296, 295), (296, 42583), (42583, 42582), (42583, 42584), (301, 42582), (42582, 298), (280, 281), (280, 282), (280, 35769), (281, 285), (281, 42598), (282, 283), (282, 286), (282, 35773), (35769, 35768), (35769, 35852), (285, 284), (285, 35845), (285, 35846), (42598, 35841), (42598, 35854), (42598, 42600), (283, 284), (283, 286), (286, 287), (286, 35772), (35768, 35863), (284, 287), (284, 35846), (35845, 35846), (35845, 35844), (35846, 35847), (287, 35775), (287, 35847), (35772, 35771), (35775, 35774), (35775, 42570), (35847, 35848), (292, 293), (292, 480), (293, 294), (293, 480), (293, 35805), (480, 479), (294, 295), (294, 35795), (294, 35796), (479, 474), (479, 478), (35795, 35796), (35795, 35770), (35796, 35797), (35796, 35799), (35770, 35863), (298, 299), (298, 300), (299, 300), (300, 35863), (302, 304), (302, 305), (305, 306), (305, 1103), (305, 1156), (1092, 1090), (1092, 1100), (1092, 1143), (1103, 1101), (1103, 1124), (1156, 1157), (1156, 1165), (1165, 1166), (319, 320), (321, 322), (321, 323), (321, 326), (321, 3481), (322, 324), (322, 325), (322, 3479), (323, 324), (323, 3430), (323, 3432), (326, 325), (326, 4173), (326, 4175), (3481, 3434), (3481, 4173), (324, 3431), (324, 3475), (325, 3480), (325, 4175), (325, 4181), (3479, 3475), (3479, 3480), (3479, 3482), (3430, 3415), (3430, 3427), (3430, 3431), (3432, 3369), (3432, 3429), (3432, 3434), (4173, 4132), (4173, 4174), (4175, 4174), (4175, 4179), (3431, 3416), (3431, 3474), (3475, 3474), (3475, 3476), (3480, 3424), (3480, 4178), (4181, 4178), (4181, 4179), (4181, 4182), (36979, 475), (36979, 36986), (328, 329), (328, 330), (328, 40094), (329, 330), (329, 11435), (330, 12041), (11435, 11433), (11435, 11434), (12041, 12022), (12041, 12058), (11433, 12176), (331, 332), (331, 333), (332, 333), (332, 35734), (333, 404), (35734, 35731), (35734, 35735), (404, 405), (405, 411), (334, 335), (334, 337), (335, 336), (337, 336), (337, 12138), (336, 12176), (12138, 12032), (12138, 12033), (12176, 12175), (12176, 12202), (42082, 42081), (42082, 42594), (42082, 42595), (345, 346), (345, 347), (345, 3294), (346, 349), (346, 3290), (346, 3338), (347, 348), (347, 3285), (347, 3294), (3294, 3290), (349, 348), (349, 3338), (349, 3339), (3290, 3293), (348, 3319), (3285, 3284), (3285, 3286), (3285, 3319), (3339, 3319), (3339, 3340), (3339, 3347), (3339, 36261), (3319, 3314), (382, 393), (361, 362), (362, 363), (362, 41760), (363, 364), (363, 41759), (364, 365), (364, 366), (376, 377), (376, 378), (376, 16472), (377, 378), (377, 12226), (377, 12227), (378, 12230), (378, 12247), (16472, 1176), (16472, 37523), (12226, 12225), (12226, 16399), (12227, 12228), (12227, 12229), (12230, 12231), (12247, 12248), (12247, 37522), (394, 395), (394, 396), (394, 7162), (395, 399), (395, 42094), (396, 397), (396, 7163), (7162, 7163), (7162, 7184), (7162, 7186), (399, 398), (399, 457), (42094, 457), (42094, 7184), (42094, 42329), (397, 398), (397, 3263), (7163, 3263), (7163, 7186), (398, 3261), (457, 456), (457, 459), (457, 20849), (457, 41945), (3263, 3264), (3263, 21184), (3261, 3262), (3261, 20839), (456, 458), (456, 21970), (459, 458), (459, 21121), (20849, 20848), (20849, 21969), (41945, 21122), (41945, 41944), (41945, 42092), (400, 401), (400, 403), (400, 592), (401, 402), (401, 41613), (403, 402), (403, 450), (592, 591), (592, 2661), (402, 445), (41613, 2625), (41613, 42211), (450, 449), (450, 451), (591, 449), (591, 2652), (2661, 2660), (2661, 2671), (445, 446), (445, 40748), (446, 447), (446, 2648), (40748, 40749), (40748, 42208), (449, 448), (411, 36193), (472, 473), (36193, 35717), (406, 407), (406, 408), (406, 6024), (407, 409), (407, 6025), (407, 36209), (408, 409), (408, 6300), (6024, 6025), (6024, 6048), (409, 5636), (409, 6301), (6025, 6049), (6025, 36224), (36209, 5636), (36209, 36224), (6300, 6301), (6300, 6302), (5636, 5637), (5636, 5638), (6301, 5637), (412, 413), (412, 414), (412, 683), (413, 418), (413, 755), (413, 7795), (414, 415), (414, 682), (683, 677), (683, 699), (418, 417), (418, 7794), (755, 756), (755, 758), (755, 7793), (7795, 7792), (7795, 7794), (415, 416), (415, 682), (682, 681), (417, 416), (417, 1024), (417, 7757), (7794, 7757), (7794, 7787), (416, 1025), (1024, 1023), (1024, 7756), (7757, 7755), (7757, 7756), (427, 35747), (427, 42052), (35747, 35748), (35747, 35749), (35747, 42058), (42052, 42053), (42052, 42054), (428, 429), (428, 430), (428, 7190), (428, 40005), (429, 431), (429, 12629), (429, 40022), (430, 431), (430, 5927), (430, 5970), (7190, 611), (7190, 7156), (40005, 40006), (431, 5925), (431, 12629), (12629, 6855), (40022, 40015), (40022, 40017), (40022, 40023), (5927, 5928), (5927, 5929), (5927, 5971), (5970, 5971), (5970, 7130), (611, 610), (611, 612), (611, 7188), (5925, 5926), (5926, 482), (5926, 5805), (436, 437), (436, 439), (436, 23898), (437, 438), (437, 33468), (439, 438), (439, 20655), (439, 23896), (23898, 23897), (23898, 40853), (438, 15713), (438, 20655), (33468, 33467), (33468, 33469), (33468, 39690), (20655, 23896), (20655, 39962), (23896, 23897), (23896, 39978), (15713, 15712), (15713, 15714), (15713, 40848), (447, 448), (447, 2647), (2648, 2649), (2648, 40749), (2647, 2646), (2647, 2934), (2647, 2938), (2652, 2575), (2652, 2653), (2652, 2935), (458, 20811), (458, 20812), (458, 21121), (21970, 20869), (21970, 21969), (20811, 20813), (20811, 21122), (20812, 20772), (20812, 20803), (20812, 20813), (21121, 21122), (463, 464), (463, 467), (463, 20571), (464, 465), (464, 5314), (464, 5315), (467, 466), (467, 20718), (467, 25505), (20571, 20572), (20571, 20576), (20571, 20725), (465, 466), (465, 40105), (465, 41916), (5314, 5312), (5314, 42134), (5315, 5313), (5315, 20576), (466, 41916), (20718, 20554), (20718, 20716), (20718, 20723), (25505, 20534), (25505, 20554), (25505, 20556), (40105, 40104), (40105, 40110), (41916, 41917), (474, 475), (475, 476), (475, 1594983), (476, 477), (476, 36977), (1594983, 1594984), (1594983, 1610675), (478, 477), (478, 35803), (478, 36976), (36977, 36978), (36977, 1594985), (36986, 541), (36986, 1594982), (36978, 36976), (35803, 35800), (35803, 35809), (35803, 35818), (481, 482), (481, 507), (482, 483), (507, 506), (507, 21548), (483, 484), (483, 4074), (506, 505), (506, 24012), (21548, 21549), (21548, 24014), (484, 485), (484, 4040), (484, 4074), (4074, 4041), (4074, 5937), (485, 486), (4040, 4039), (4040, 4041), (486, 487), (486, 5809), (4039, 5809), (487, 488), (487, 489), (5809, 5807), (5809, 5943), (489, 490), (489, 5808), (5807, 5808), (490, 491), (490, 5951), (5808, 5951), (491, 492), (491, 4077), (5951, 4077), (5951, 5948), (492, 493), (492, 4076), (4077, 4075), (4077, 5954), (493, 494), (493, 7131), (4076, 4075), (4076, 5813), (494, 495), (494, 7133), (7131, 5813), (7131, 7132), (7131, 7152), (495, 496), (495, 7154), (7133, 7132), (7133, 7154), (496, 497), (496, 7145), (7154, 7153), (7154, 7161), (7154, 7206), (497, 498), (497, 7142), (7145, 7142), (7145, 7146), (7145, 7207), (498, 499), (7142, 499), (7142, 7141), (499, 500), (7141, 500), (7141, 7144), (7141, 7165), (500, 501), (501, 502), (501, 7164), (501, 7165), (501, 23431), (7164, 7165), (7164, 7166), (7164, 23431), (7165, 7166), (23431, 7180), (504, 505), (504, 4044), (505, 4044), (505, 24013), (4044, 24012), (24013, 24012), (509, 510), (509, 511), (509, 6685), (510, 513), (510, 6681), (511, 512), (511, 6684), (511, 6696), (6685, 6679), (6685, 6684), (6685, 6699), (513, 512), (513, 6616), (6681, 6621), (6681, 6679), (6681, 6682), (512, 6604), (512, 6683), (6684, 6700), (6684, 6963), (6696, 6683), (6696, 6700), (6696, 6953), (6616, 6605), (6616, 6621), (6604, 6605), (6604, 6606), (6604, 6620), (6683, 6620), (6683, 6893), (514, 515), (514, 516), (514, 1119), (514, 5892), (515, 516), (515, 1120), (516, 5883), (516, 5884), (516, 5894), (1119, 1118), (1119, 5890), (1119, 5896), (1120, 1118), (1120, 5902), (5883, 5874), (5883, 5882), (5883, 5893), (5884, 5862), (5884, 5874), (5884, 5894), (5894, 5854), (5894, 5864), (517, 518), (517, 519), (517, 8146), (518, 520), (518, 8154), (518, 8155), (519, 520), (519, 8145), (519, 8153), (8146, 8137), (8146, 8147), (520, 8153), (520, 8155), (8154, 8147), (8154, 8156), (8155, 8152), (8155, 8157), (8145, 8124), (8145, 8148), (8145, 8153), (8153, 8151), (8153, 8152), (521, 522), (521, 36982), (521, 36992), (522, 523), (36982, 36983), (36992, 36991), (36992, 36993), (523, 524), (524, 526), (524, 36201), (526, 1166), (36201, 36200), (36201, 36202), (1166, 1167), (527, 528), (527, 529), (527, 532), (528, 531), (528, 534), (528, 5432), (529, 530), (529, 5418), (532, 533), (532, 5444), (532, 5449), (531, 530), (531, 5421), (531, 5422), (534, 535), (534, 5433), (534, 5438), (5432, 5421), (5432, 5433), (530, 5423), (5418, 5368), (5418, 5417), (5418, 5424), (533, 535), (533, 5450), (5444, 5417), (5444, 5445), (5444, 5448), (5449, 5450), (5421, 5391), (5421, 5420), (5422, 5423), (535, 5443), (5433, 5431), (5433, 5436), (5438, 5437), (5438, 5442), (5438, 7984), (5423, 5367), (5423, 5424), (5443, 5442), (5443, 5447), (536, 537), (536, 541), (536, 542), (537, 538), (537, 36981), (541, 540), (542, 543), (538, 539), (538, 36985), (538, 1603443), (36981, 543), (540, 539), (540, 1594982), (539, 1603442), (36985, 36984), (36985, 1603443), (1603443, 1603442), (1603443, 1607299), (1603442, 1607298), (1594982, 1593601), (544, 545), (544, 546), (544, 4371), (544, 4373), (545, 547), (545, 4481), (546, 547), (4371, 4372), (4371, 4476), (4371, 4487), (4373, 4372), (4373, 4481), (4373, 4485), (4481, 4480), (4481, 4484), (551, 552), (551, 553), (551, 559), (552, 555), (552, 556), (553, 554), (553, 36197), (559, 558), (559, 560), (555, 554), (555, 556), (556, 557), (554, 557), (554, 1189), (36197, 36196), (36197, 36207), (558, 560), (558, 2023), (560, 2025), (560, 37003), (557, 561), (1189, 1187), (1189, 1190), (561, 568), (568, 573), (2023, 2024), (2023, 37015), (2025, 2024), (2025, 37004), (37003, 37004), (37003, 37005), (573, 577), (562, 563), (562, 566), (562, 567), (563, 564), (563, 37017), (566, 565), (566, 567), (566, 569), (567, 37020), (564, 565), (564, 37016), (37017, 37018), (37017, 37019), (565, 569), (569, 579), (579, 578), (577, 575), (578, 589), (570, 571), (570, 572), (571, 589), (572, 574), (574, 580), (580, 587), (575, 576), (587, 590), (576, 588), (588, 590), (581, 582), (581, 583), (581, 22099), (582, 586), (582, 22099), (583, 584), (583, 22098), (22099, 21926), (586, 585), (586, 944), (584, 585), (22098, 21927), (22098, 22151), (585, 944), (585, 22105), (585, 22107), (585, 22113), (944, 31944), (22105, 17398), (22105, 22106), (22107, 22108), (22107, 22113), (22113, 22108), (593, 596), (596, 594), (596, 595), (594, 595), (594, 36021), (595, 36020), (36020, 36017), (36020, 36022), (597, 598), (597, 599), (597, 6851), (597, 7251), (598, 599), (598, 7066), (599, 6859), (6851, 6007), (6851, 7261), (7251, 7250), (7251, 7263), (7066, 7068), (7066, 7263), (7066, 7351), (6859, 6858), (6859, 7067), (600, 601), (600, 603), (600, 663), (600, 3470), (601, 602), (601, 3484), (601, 3498), (603, 602), (603, 664), (663, 665), (663, 3469), (3470, 3469), (3470, 3473), (3470, 3494), (602, 3452), (3484, 3452), (3484, 3478), (3484, 3497), (3484, 3498), (3498, 3494), (3498, 3504), (664, 665), (664, 3439), (664, 3451), (3452, 3453), (604, 605), (604, 606), (604, 676), (604, 36183), (605, 608), (606, 607), (606, 41826), (676, 675), (676, 695), (676, 36179), (36183, 36179), (36183, 36182), (36183, 36190), (608, 607), (608, 675), (607, 673), (41826, 41825), (41826, 41892), (675, 672), (675, 692), (673, 672), (673, 674), (609, 610), (609, 614), (609, 40021), (610, 6013), (614, 613), (614, 40010), (40021, 40020), (6013, 6012), (6013, 6014), (613, 612), (613, 40010), (40010, 40009), (612, 40004), (7188, 7189), (7188, 7192), (615, 616), (615, 617), (615, 1494580), (616, 624), (616, 661), (617, 618), (1494580, 661), (1494580, 1494584), (624, 623), (624, 662), (661, 662), (661, 109371), (618, 619), (618, 37031), (623, 622), (662, 109372), (662, 139985), (619, 620), (619, 36225), (37031, 37030), (37031, 37033), (37031, 1494587), (620, 621), (620, 836), (36225, 834), (621, 622), (836, 768), (836, 834), (836, 109373), (625, 626), (625, 648), (625, 12653), (626, 627), (648, 639), (648, 12794), (12653, 12654), (12653, 12655), (627, 628), (628, 629), (629, 630), (629, 12608), (630, 631), (12608, 12604)] Total number of nodes : 1410 Total number of edges : 1763
nx.is_connected(G) # Check whether the graph is fully connected
False
# Computes subgraphs and stores them in a list
S = [G.subgraph(c).copy() for c in nx.connected_components(G)]
# Print subgraphs and its statistics
for graph_idx, graph in enumerate(S) :
print("-"*20,f"Graph {graph_idx}", "-"*20)
graph_pos = nx.nx_pydot.graphviz_layout(S[graph_idx])
plt.figure(figsize=(20,14))
nx.draw(S[graph_idx], pos = graph_pos, node_size=1200, node_color='lightblue', linewidths=0.25,font_size=10, with_labels=True)
plt.show()
print("-"*10,"Graph Stats ", "-"*10)
num_edges = graph.number_of_edges()
num_nodes = graph.number_of_nodes()
print(f"Nodes : {num_nodes} Edges : {num_nodes}")
print(f"Diameter : {nx.diameter(graph)}") # Diameter
print(f"Periphery : {nx.periphery(graph)}") # Periphery
degrees = [graph.degree(n) for n in graph.nodes()]
plt.hist(degrees)
plt.show()
# Density
density = nx.density(graph)
print(f"Density of the graph: {density}")
# Max and Min degree
degrees = dict(graph.degree())
max_degree = max(degrees.values())
min_degree = min(degrees.values())
# Average degree
avg_degree = (2 * num_edges) / num_nodes
print(f"Average degree: {avg_degree}")
# Number of connected components
connected_components = list(nx.connected_components(graph))
largest_component_size = max(len(c) for c in connected_components) # Find the size of the largest connected component
print(f"Size of the largest connected component: {largest_component_size}")
# Degree assortativity
assortativity = nx.degree_assortativity_coefficient(graph)
print(f"Degree assortativity coefficient: {assortativity}")
# Degree Centrality
deg_centrality=nx.degree_centrality(graph)
res = {key : round(deg_centrality[key], 3) for key in deg_centrality}
df=pd.DataFrame(res.items(), columns=["Node", "Degree Centrality"])
print(df.sort_values('Degree Centrality',ascending=False))
# Closeness Centrality
Closeness_centrality=nx.closeness_centrality(graph)
res = {key : round(Closeness_centrality[key], 3) for key in Closeness_centrality}
df=pd.DataFrame(res.items(), columns=["Node", "Closeness Centrality"])
print(df.sort_values('Closeness Centrality',ascending=False))
# Between Centrality
Betweenness_centrality=nx.betweenness_centrality(graph)
res = {key : round(Betweenness_centrality[key], 3) for key in Betweenness_centrality}
df=pd.DataFrame(res.items(), columns=["Node", "Betweenness Centrality"])
print(df.sort_values('Betweenness Centrality',ascending=False))
# Katz Centrality
Katz_centrality=nx.katz_centrality(graph,alpha=0.05, beta=1.0, max_iter=1000, tol=1e-02, nstart=None, normalized=True, weight=None)
res = {key : round(Katz_centrality[key], 3) for key in Katz_centrality}
df=pd.DataFrame(res.items(), columns=["Node", "Katz Centrality"])
print(df.sort_values('Katz Centrality',ascending=False))
# Bridges
plt.figure(figsize=(20,14))
graph_bridges = list(nx.bridges(graph))
# Draw all edges with default color
nx.draw(graph, graph_pos, with_labels=True, edge_color='green', node_color='lightblue', node_size=700 ,linewidths=0.25,font_size=10)
bridge_edges = [(u, v) for u, v in graph_bridges]
# Draw bridges with a different color (red)
nx.draw_networkx_edges(graph, graph_pos, edgelist=bridge_edges, edge_color='red', width=3)
plt.show()
# Community Detection
result = nxcom.girvan_newman(graph)
communities = next(result)
set_node_community(graph, communities)
set_edge_community(graph)
# Set community color for nodes
node_color = [get_color(graph.nodes[v]['community']) for v in graph.nodes]
# Set community color for internal edges
external = [(v, w) for v, w in graph.edges if graph.edges[v, w]['community'] == 0]
internal = [(v, w) for v, w in graph.edges if graph.edges[v, w]['community'] > 0]
internal_color = [get_color(graph.edges[e]['community']) for e in internal]
plt.figure(figsize=(20,14))
nx.draw_networkx(
graph, pos=graph_pos, node_size=0,
edgelist=external, edge_color="#333333", with_labels=False)
nx.draw_networkx(
graph, pos=graph_pos, node_color=node_color,
edgelist=internal, edge_color=internal_color , with_labels= False)
plt.show()
print("-"*50)
-------------------- Graph 0 --------------------
---------- Graph Stats ---------- Nodes : 591 Edges : 591 Diameter : 45 Periphery : [2256, 2258, 35774, 35848, 42570]
Density of the graph: 0.004468152226906421
Average degree: 2.6362098138747885
Size of the largest connected component: 591
Degree assortativity coefficient: -0.07240299819279103
Node Degree Centrality
475 1068 0.008
105 125 0.008
131 151 0.007
159 179 0.007
362 470 0.007
.. ... ...
80 36963 0.002
448 35797 0.002
449 35799 0.002
450 35800 0.002
590 1593601 0.002
[591 rows x 2 columns]
Node Closeness Centrality
109 129 0.077
168 190 0.076
169 191 0.076
312 371 0.076
183 210 0.076
.. ... ...
190 2256 0.040
191 2258 0.040
569 1607299 0.040
579 36984 0.039
466 1048 0.039
[591 rows x 2 columns]
Node Betweenness Centrality
264 303 0.222
266 305 0.211
263 302 0.203
185 212 0.189
224 263 0.182
.. ... ...
464 35854 0.000
236 275 0.000
466 1048 0.000
235 274 0.000
590 1593601 0.000
[591 rows x 2 columns]
Node Katz Centrality
105 125 0.046
475 1068 0.046
294 353 0.044
108 128 0.044
109 129 0.044
.. ... ...
455 35841 0.038
456 35844 0.038
65 85 0.038
460 35848 0.038
590 1593601 0.038
[591 rows x 2 columns]
-------------------------------------------------- -------------------- Graph 1 --------------------
---------- Graph Stats ---------- Nodes : 63 Edges : 63 Diameter : 13 Periphery : [1628954, 35890, 35891, 35892]
Density of the graph: 0.03789042498719918
Average degree: 2.3492063492063493
Size of the largest connected component: 63
Degree assortativity coefficient: -0.47263681592039875
Node Degree Centrality
22 1198 0.065
28 35886 0.065
43 27343 0.065
60 1641587 0.065
48 45 0.065
.. ... ...
39 1538362 0.016
40 27335 0.016
41 35887 0.016
42 27342 0.016
62 27250 0.016
[63 rows x 2 columns]
Node Closeness Centrality
24 48 0.207
30 46 0.206
25 49 0.206
27 47 0.206
48 45 0.202
.. ... ...
36 35892 0.134
35 35891 0.134
34 35890 0.134
10 1628954 0.133
4 1641606 0.133
[63 rows x 2 columns]
Node Betweenness Centrality
48 45 0.380
24 48 0.368
30 46 0.348
25 49 0.334
12 36 0.321
.. ... ...
38 27323 0.000
39 1538362 0.000
40 27335 0.000
41 35887 0.000
62 27250 0.000
[63 rows x 2 columns]
Node Katz Centrality
12 36 0.137
48 45 0.137
30 46 0.137
22 1198 0.136
37 27325 0.136
.. ... ...
39 1538362 0.117
40 27335 0.117
41 35887 0.117
42 27342 0.117
62 27250 0.117
[63 rows x 2 columns]
-------------------------------------------------- -------------------- Graph 2 --------------------
---------- Graph Stats ---------- Nodes : 24 Edges : 24 Diameter : 6 Periphery : [4096, 4099, 4100, 4117, 4149, 4154, 4153, 4156, 3938, 3940]
Density of the graph: 0.11594202898550725
Average degree: 2.6666666666666665
Size of the largest connected component: 24
Degree assortativity coefficient: -0.24242424242424243
Node Degree Centrality
12 4148 0.174
21 3937 0.174
6 4114 0.174
20 225 0.174
8 4120 0.174
10 53 0.174
19 224 0.174
13 4152 0.174
18 223 0.174
3 4109 0.130
4 4110 0.130
5 4113 0.130
9 52 0.130
11 54 0.130
16 4153 0.087
23 3940 0.087
7 4117 0.087
15 4154 0.043
17 4156 0.043
14 4149 0.043
1 4099 0.043
2 4100 0.043
22 3938 0.043
0 4096 0.043
Node Closeness Centrality
20 225 0.418
10 53 0.411
19 224 0.404
18 223 0.404
12 4148 0.359
13 4152 0.354
21 3937 0.348
8 4120 0.348
9 52 0.348
11 54 0.348
6 4114 0.333
3 4109 0.324
4 4110 0.315
5 4113 0.315
16 4153 0.311
7 4117 0.295
23 3940 0.280
14 4149 0.267
17 4156 0.264
15 4154 0.261
22 3938 0.261
1 4099 0.253
2 4100 0.247
0 4096 0.242
Node Betweenness Centrality
20 225 0.276
19 224 0.272
18 223 0.241
12 4148 0.215
21 3937 0.205
13 4152 0.176
10 53 0.173
8 4120 0.172
6 4114 0.156
3 4109 0.121
4 4110 0.110
16 4153 0.071
5 4113 0.071
11 54 0.047
9 52 0.039
7 4117 0.032
23 3940 0.022
17 4156 0.000
15 4154 0.000
14 4149 0.000
1 4099 0.000
2 4100 0.000
22 3938 0.000
0 4096 0.000
Node Katz Centrality
20 225 0.219
18 223 0.219
10 53 0.218
19 224 0.218
12 4148 0.217
21 3937 0.217
6 4114 0.216
8 4120 0.216
13 4152 0.216
9 52 0.208
11 54 0.208
3 4109 0.207
5 4113 0.207
4 4110 0.206
16 4153 0.197
23 3940 0.197
7 4117 0.197
15 4154 0.187
17 4156 0.187
14 4149 0.187
1 4099 0.187
22 3938 0.187
2 4100 0.186
0 4096 0.186
-------------------------------------------------- -------------------- Graph 3 --------------------
---------- Graph Stats ---------- Nodes : 40 Edges : 40 Diameter : 8 Periphery : [6794, 6798, 6722, 6736, 6737, 6765, 6769]
Density of the graph: 0.07051282051282051
Average degree: 2.75
Size of the largest connected component: 40
Degree assortativity coefficient: -0.42708873897249455
Node Degree Centrality
21 6738 0.154
0 6790 0.128
2 136 0.128
5 6793 0.128
13 6713 0.128
28 103 0.103
24 99 0.103
17 6733 0.103
25 100 0.103
26 101 0.103
27 102 0.103
10 6805 0.103
11 421 0.103
29 6760 0.103
33 6764 0.103
38 6771 0.103
4 6792 0.103
3 137 0.103
23 6748 0.103
37 6770 0.077
39 6772 0.051
1 6791 0.051
19 6736 0.051
18 6734 0.051
9 6802 0.051
32 6763 0.026
6 6794 0.026
7 6797 0.026
36 6769 0.026
35 6766 0.026
34 6765 0.026
8 6798 0.026
30 6757 0.026
31 6759 0.026
22 6747 0.026
12 6711 0.026
14 6714 0.026
15 6717 0.026
16 6722 0.026
20 6737 0.026
Node Closeness Centrality
25 100 0.358
28 103 0.345
24 99 0.342
3 137 0.325
26 101 0.325
27 102 0.325
2 136 0.312
0 6790 0.300
29 6760 0.293
23 6748 0.285
11 421 0.285
13 6713 0.279
4 6792 0.277
33 6764 0.271
38 6771 0.267
21 6738 0.267
17 6733 0.264
10 6805 0.262
9 6802 0.253
1 6791 0.250
5 6793 0.242
18 6734 0.242
37 6770 0.232
39 6772 0.232
30 6757 0.228
19 6736 0.224
22 6747 0.223
31 6759 0.223
15 6717 0.219
14 6714 0.219
12 6711 0.219
32 6763 0.214
35 6766 0.214
34 6765 0.212
20 6737 0.212
16 6722 0.210
7 6797 0.209
8 6798 0.196
6 6794 0.196
36 6769 0.189
Node Betweenness Centrality
28 103 0.349
25 100 0.275
27 102 0.261
3 137 0.225
13 6713 0.176
26 101 0.172
24 99 0.168
11 421 0.166
2 136 0.161
21 6738 0.161
29 6760 0.144
23 6748 0.138
33 6764 0.126
0 6790 0.117
5 6793 0.112
10 6805 0.101
17 6733 0.090
38 6771 0.076
4 6792 0.071
37 6770 0.051
1 6791 0.017
18 6734 0.016
19 6736 0.010
34 6765 0.000
32 6763 0.000
31 6759 0.000
35 6766 0.000
30 6757 0.000
36 6769 0.000
20 6737 0.000
22 6747 0.000
16 6722 0.000
15 6717 0.000
14 6714 0.000
12 6711 0.000
9 6802 0.000
8 6798 0.000
7 6797 0.000
6 6794 0.000
39 6772 0.000
Node Katz Centrality
21 6738 0.181
2 136 0.177
0 6790 0.175
5 6793 0.174
13 6713 0.173
28 103 0.169
3 137 0.169
24 99 0.169
25 100 0.169
26 101 0.169
27 102 0.169
11 421 0.169
10 6805 0.168
38 6771 0.168
4 6792 0.168
29 6760 0.167
33 6764 0.166
17 6733 0.166
23 6748 0.166
37 6770 0.159
39 6772 0.152
1 6791 0.152
9 6802 0.152
19 6736 0.152
18 6734 0.152
6 6794 0.144
34 6765 0.144
8 6798 0.144
20 6737 0.144
12 6711 0.144
14 6714 0.144
15 6717 0.144
22 6747 0.143
31 6759 0.143
32 6763 0.143
35 6766 0.143
36 6769 0.143
7 6797 0.143
16 6722 0.143
30 6757 0.143
-------------------------------------------------- -------------------- Graph 4 --------------------
---------- Graph Stats ---------- Nodes : 121 Edges : 121 Diameter : 25 Periphery : [7206, 40009, 40020, 7153, 7161]
Density of the graph: 0.020523415977961434
Average degree: 2.4628099173553717
Size of the largest connected component: 121
Degree assortativity coefficient: -0.20686639974227827
Node Degree Centrality
119 501 0.042
32 7154 0.042
26 611 0.033
102 4077 0.033
47 7165 0.033
.. ... ...
86 7130 0.008
54 5937 0.008
23 40023 0.008
97 488 0.008
0 7176 0.008
[121 rows x 2 columns]
Node Closeness Centrality
91 482 0.131
90 481 0.126
50 5926 0.125
92 483 0.125
116 507 0.123
.. ... ...
65 6012 0.071
59 15686 0.071
67 6014 0.071
16 40009 0.067
20 40020 0.067
[121 rows x 2 columns]
Node Betweenness Centrality
91 482 0.537
50 5926 0.448
49 5925 0.430
73 431 0.428
116 507 0.340
.. ... ...
86 7130 0.000
33 7332 0.000
31 7153 0.000
30 7146 0.000
0 7176 0.000
[121 rows x 2 columns]
Node Katz Centrality
119 501 0.103
32 7154 0.101
71 429 0.099
72 430 0.099
47 7165 0.099
.. ... ...
65 6012 0.084
34 5805 0.084
33 7332 0.084
97 488 0.084
0 7176 0.084
[121 rows x 2 columns]
-------------------------------------------------- -------------------- Graph 5 --------------------
---------- Graph Stats ---------- Nodes : 27 Edges : 27 Diameter : 7 Periphery : [4896, 4898, 7881, 7882, 7887, 7888, 43222, 7921, 7924, 7927]
Density of the graph: 0.08831908831908832
Average degree: 2.2962962962962963
Size of the largest connected component: 27
Degree assortativity coefficient: -0.16279069767441873
Node Degree Centrality
16 222 0.192
14 221 0.154
23 7926 0.154
17 7918 0.154
15 7901 0.154
13 220 0.115
25 7931 0.115
4 4899 0.115
20 7923 0.115
19 7922 0.115
10 217 0.115
11 218 0.115
12 219 0.115
1 4895 0.115
26 7932 0.077
9 43222 0.038
8 7888 0.038
7 7887 0.038
18 7921 0.038
6 7882 0.038
5 7881 0.038
21 7924 0.038
22 7925 0.038
3 4898 0.038
24 7927 0.038
2 4896 0.038
0 7937 0.038
Node Closeness Centrality
14 221 0.413
16 222 0.406
13 220 0.366
10 217 0.347
17 7918 0.325
15 7901 0.325
1 4895 0.321
12 219 0.317
23 7926 0.313
11 218 0.313
4 4899 0.310
25 7931 0.292
26 7932 0.277
22 7925 0.260
19 7922 0.257
20 7923 0.255
8 7888 0.248
7 7887 0.248
6 7882 0.248
5 7881 0.248
2 4896 0.245
9 43222 0.241
24 7927 0.241
3 4898 0.239
0 7937 0.228
18 7921 0.206
21 7924 0.205
Node Betweenness Centrality
16 222 0.480
14 221 0.452
13 220 0.273
10 217 0.223
15 7901 0.194
12 219 0.192
17 7918 0.181
11 218 0.177
23 7926 0.151
1 4895 0.122
19 7922 0.105
20 7923 0.102
25 7931 0.098
4 4899 0.077
26 7932 0.018
9 43222 0.000
8 7888 0.000
7 7887 0.000
18 7921 0.000
6 7882 0.000
5 7881 0.000
21 7924 0.000
22 7925 0.000
3 4898 0.000
24 7927 0.000
2 4896 0.000
0 7937 0.000
Node Katz Centrality
16 222 0.220
14 221 0.211
23 7926 0.208
17 7918 0.208
15 7901 0.207
13 220 0.200
4 4899 0.200
1 4895 0.200
10 217 0.199
11 218 0.199
12 219 0.199
25 7931 0.198
20 7923 0.198
19 7922 0.198
26 7932 0.189
9 43222 0.180
8 7888 0.180
7 7887 0.180
6 7882 0.180
5 7881 0.180
24 7927 0.180
18 7921 0.179
21 7924 0.179
22 7925 0.179
3 4898 0.179
2 4896 0.179
0 7937 0.179
-------------------------------------------------- -------------------- Graph 6 --------------------
---------- Graph Stats ---------- Nodes : 38 Edges : 38 Diameter : 11 Periphery : [3888, 3890, 3272, 3284, 3286, 3931]
Density of the graph: 0.06970128022759602
Average degree: 2.5789473684210527
Size of the largest connected component: 38
Degree assortativity coefficient: -0.23213738117141988
Node Degree Centrality
21 346 0.135
32 239 0.135
1 3339 0.135
37 3319 0.108
11 3276 0.108
31 238 0.108
14 3285 0.108
27 347 0.108
24 349 0.108
22 3295 0.081
23 3296 0.081
26 348 0.081
25 3290 0.081
28 3294 0.081
30 237 0.081
33 240 0.081
34 241 0.081
20 3292 0.081
0 3338 0.081
18 3291 0.081
6 3889 0.081
16 345 0.081
8 3271 0.081
17 3930 0.081
36 3314 0.027
35 4080 0.027
2 3340 0.027
3 3347 0.027
4 36261 0.027
5 3888 0.027
7 3890 0.027
29 3293 0.027
9 3272 0.027
10 3275 0.027
12 3277 0.027
13 3284 0.027
15 3286 0.027
19 3931 0.027
Node Closeness Centrality
18 3291 0.287
21 346 0.282
23 3296 0.282
0 3338 0.278
20 3292 0.274
24 349 0.274
22 3295 0.262
34 241 0.255
31 238 0.252
11 3276 0.247
16 345 0.240
1 3339 0.239
26 348 0.237
25 3290 0.233
33 240 0.231
32 239 0.228
30 237 0.219
27 347 0.218
37 3319 0.210
35 4080 0.209
28 3294 0.207
12 3277 0.199
10 3275 0.199
14 3285 0.195
2 3340 0.194
3 3347 0.194
4 36261 0.194
6 3889 0.193
8 3271 0.191
29 3293 0.190
17 3930 0.186
36 3314 0.175
15 3286 0.164
13 3284 0.164
7 3890 0.162
5 3888 0.161
9 3272 0.161
19 3931 0.157
Node Betweenness Centrality
21 346 0.337
31 238 0.298
24 349 0.298
22 3295 0.291
23 3296 0.286
18 3291 0.272
32 239 0.266
0 3338 0.232
20 3292 0.222
1 3339 0.205
11 3276 0.141
27 347 0.118
14 3285 0.116
16 345 0.114
37 3319 0.107
8 3271 0.107
33 240 0.093
34 241 0.089
30 237 0.087
26 348 0.079
25 3290 0.072
6 3889 0.066
17 3930 0.056
28 3294 0.018
29 3293 0.000
36 3314 0.000
35 4080 0.000
2 3340 0.000
3 3347 0.000
15 3286 0.000
4 36261 0.000
13 3284 0.000
5 3888 0.000
7 3890 0.000
9 3272 0.000
10 3275 0.000
12 3277 0.000
19 3931 0.000
Node Katz Centrality
32 239 0.182
21 346 0.182
1 3339 0.180
24 349 0.175
37 3319 0.174
31 238 0.174
27 347 0.174
14 3285 0.173
11 3276 0.172
16 345 0.166
34 241 0.166
33 240 0.166
30 237 0.166
26 348 0.166
18 3291 0.166
0 3338 0.166
20 3292 0.165
22 3295 0.165
23 3296 0.165
25 3290 0.165
28 3294 0.165
6 3889 0.165
8 3271 0.164
17 3930 0.164
15 3286 0.149
5 3888 0.149
36 3314 0.149
35 4080 0.149
2 3340 0.149
3 3347 0.149
4 36261 0.149
7 3890 0.149
29 3293 0.149
9 3272 0.149
10 3275 0.149
12 3277 0.149
13 3284 0.149
19 3931 0.149
-------------------------------------------------- -------------------- Graph 7 --------------------
---------- Graph Stats ---------- Nodes : 2 Edges : 2 Diameter : 1 Periphery : [320, 319]
Density of the graph: 1.0 Average degree: 1.0 Size of the largest connected component: 2 Degree assortativity coefficient: nan Node Degree Centrality 0 320 1.0 1 319 1.0 Node Closeness Centrality 0 320 1.0 1 319 1.0 Node Betweenness Centrality 0 320 0.0 1 319 0.0 Node Katz Centrality 0 320 0.707 1 319 0.707
/Users/ha5hkat/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/algorithms/assortativity/correlation.py:302: RuntimeWarning: invalid value encountered in scalar divide return float((xy * (M - ab)).sum() / np.sqrt(vara * varb))
-------------------------------------------------- -------------------- Graph 8 --------------------
---------- Graph Stats ---------- Nodes : 31 Edges : 31 Diameter : 7 Periphery : [3474, 3476, 4132, 3369, 4178, 4182, 3415, 3416, 3424, 3427, 3429]
Density of the graph: 0.09032258064516129
Average degree: 2.7096774193548385
Size of the largest connected component: 31
Degree assortativity coefficient: -0.21188630490956037
Node Degree Centrality
13 325 0.167
15 4173 0.133
20 4181 0.133
1 3475 0.133
14 326 0.133
12 324 0.133
11 323 0.133
10 322 0.133
9 321 0.133
27 3430 0.133
28 3431 0.133
4 3480 0.133
3 3479 0.133
29 3432 0.133
17 4175 0.133
5 3481 0.100
18 4178 0.067
19 4179 0.067
0 3474 0.067
16 4174 0.067
30 3434 0.067
8 3369 0.033
21 4182 0.033
22 3415 0.033
23 3416 0.033
24 3424 0.033
25 3427 0.033
26 3429 0.033
7 4132 0.033
6 3482 0.033
2 3476 0.033
Node Closeness Centrality
10 322 0.385
9 321 0.375
12 324 0.366
11 323 0.357
13 325 0.353
14 326 0.345
3 3479 0.323
17 4175 0.309
1 3475 0.309
5 3481 0.306
4 3480 0.300
28 3431 0.297
29 3432 0.291
27 3430 0.291
15 4173 0.286
20 4181 0.278
30 3434 0.270
16 4174 0.261
0 3474 0.259
19 4179 0.250
6 3482 0.246
18 4178 0.244
2 3476 0.238
24 3424 0.233
23 3416 0.231
8 3369 0.227
22 3415 0.227
25 3427 0.227
26 3429 0.227
7 4132 0.224
21 4182 0.219
Node Betweenness Centrality
11 323 0.305
13 325 0.273
10 322 0.261
9 321 0.242
12 324 0.236
3 3479 0.175
14 326 0.165
27 3430 0.155
29 3432 0.154
4 3480 0.144
1 3475 0.141
28 3431 0.127
15 4173 0.104
20 4181 0.102
5 3481 0.087
17 4175 0.084
30 3434 0.028
0 3474 0.020
18 4178 0.014
16 4174 0.008
19 4179 0.006
8 3369 0.000
21 4182 0.000
22 3415 0.000
23 3416 0.000
24 3424 0.000
25 3427 0.000
26 3429 0.000
7 4132 0.000
6 3482 0.000
2 3476 0.000
Node Katz Centrality
13 325 0.202
10 322 0.193
14 326 0.193
9 321 0.192
12 324 0.192
11 323 0.192
17 4175 0.191
3 3479 0.191
20 4181 0.190
28 3431 0.190
4 3480 0.190
1 3475 0.190
15 4173 0.190
27 3430 0.189
29 3432 0.189
5 3481 0.182
18 4178 0.173
19 4179 0.173
0 3474 0.173
16 4174 0.173
30 3434 0.173
21 4182 0.164
22 3415 0.164
23 3416 0.164
24 3424 0.164
25 3427 0.164
7 4132 0.164
6 3482 0.164
2 3476 0.164
8 3369 0.163
26 3429 0.163
-------------------------------------------------- -------------------- Graph 9 --------------------
---------- Graph Stats ---------- Nodes : 20 Edges : 20 Diameter : 10 Periphery : [12032, 12033, 12058, 12022]
Density of the graph: 0.11052631578947368
Average degree: 2.1
Size of the largest connected component: 20
Degree assortativity coefficient: -0.4583333333333324
Node Degree Centrality
4 12176 0.211
13 330 0.158
2 12041 0.158
18 12138 0.158
17 337 0.158
16 336 0.158
9 11435 0.158
11 328 0.158
12 329 0.158
7 11433 0.105
15 335 0.105
14 334 0.105
0 12032 0.053
10 12202 0.053
1 12033 0.053
8 11434 0.053
6 40094 0.053
5 12058 0.053
3 12175 0.053
19 12022 0.053
Node Closeness Centrality
4 12176 0.317
7 11433 0.317
9 11435 0.306
16 336 0.288
12 329 0.279
17 337 0.250
10 12202 0.244
3 12175 0.244
13 330 0.244
8 11434 0.237
11 328 0.237
15 335 0.232
18 12138 0.211
2 12041 0.207
14 334 0.207
6 40094 0.194
0 12032 0.176
1 12033 0.176
5 12058 0.173
19 12022 0.173
Node Betweenness Centrality
4 12176 0.614
9 11435 0.556
7 11433 0.526
16 336 0.468
12 329 0.456
17 337 0.322
13 330 0.281
2 12041 0.205
18 12138 0.205
11 328 0.105
15 335 0.041
14 334 0.012
0 12032 0.000
10 12202 0.000
1 12033 0.000
8 11434 0.000
6 40094 0.000
5 12058 0.000
3 12175 0.000
19 12022 0.000
Node Katz Centrality
4 12176 0.243
17 337 0.234
16 336 0.234
12 329 0.234
13 330 0.234
9 11435 0.233
11 328 0.233
2 12041 0.232
18 12138 0.232
7 11433 0.223
14 334 0.222
15 335 0.222
10 12202 0.212
3 12175 0.212
0 12032 0.211
1 12033 0.211
8 11434 0.211
6 40094 0.211
5 12058 0.211
19 12022 0.211
-------------------------------------------------- -------------------- Graph 10 --------------------
---------- Graph Stats ---------- Nodes : 17 Edges : 17 Diameter : 5 Periphery : [12225, 12228, 12229, 12231, 16399, 37522, 37523, 1176, 12248]
Density of the graph: 0.125
Average degree: 2.0
Size of the largest connected component: 17
Degree assortativity coefficient: -0.00563380281690109
Node Degree Centrality
13 378 0.250
12 377 0.250
10 12247 0.188
2 12227 0.188
14 16472 0.188
1 12226 0.188
11 376 0.188
5 12230 0.125
0 12225 0.062
15 1176 0.062
8 37522 0.062
9 37523 0.062
7 16399 0.062
6 12231 0.062
4 12229 0.062
3 12228 0.062
16 12248 0.062
Node Closeness Centrality
12 377 0.485
13 378 0.471
11 376 0.444
2 12227 0.364
1 12226 0.364
10 12247 0.356
5 12230 0.340
14 16472 0.340
0 12225 0.271
3 12228 0.271
4 12229 0.271
7 16399 0.271
8 37522 0.267
16 12248 0.267
9 37523 0.258
6 12231 0.258
15 1176 0.258
Node Betweenness Centrality
12 377 0.575
13 378 0.508
11 376 0.325
10 12247 0.242
2 12227 0.242
14 16472 0.242
1 12226 0.242
5 12230 0.125
0 12225 0.000
15 1176 0.000
8 37522 0.000
9 37523 0.000
7 16399 0.000
6 12231 0.000
4 12229 0.000
3 12228 0.000
16 12248 0.000
Node Katz Centrality
12 377 0.269
13 378 0.268
11 376 0.257
10 12247 0.253
2 12227 0.253
14 16472 0.253
1 12226 0.253
5 12230 0.242
0 12225 0.230
15 1176 0.230
8 37522 0.230
9 37523 0.230
7 16399 0.230
4 12229 0.230
3 12228 0.230
16 12248 0.230
6 12231 0.229
-------------------------------------------------- -------------------- Graph 11 --------------------
---------- Graph Stats ---------- Nodes : 37 Edges : 37 Diameter : 9 Periphery : [20772, 3264, 21184, 20803, 20813]
Density of the graph: 0.07207207207207207
Average degree: 2.5945945945945947
Size of the largest connected component: 37
Degree assortativity coefficient: -0.15895372233400676
Node Degree Centrality
19 457 0.167
20 458 0.139
36 7163 0.111
14 3263 0.111
35 7162 0.111
32 42094 0.111
29 41945 0.111
23 20812 0.111
34 20849 0.083
26 21970 0.083
22 20811 0.083
21 459 0.083
1 21122 0.083
0 21121 0.083
18 456 0.083
7 398 0.083
3 394 0.083
4 395 0.083
12 3261 0.083
5 396 0.083
6 397 0.083
8 399 0.083
24 20813 0.056
25 21969 0.056
9 7184 0.056
10 7186 0.056
15 3264 0.028
27 41944 0.028
28 42329 0.028
11 20772 0.028
30 20839 0.028
31 42092 0.028
17 20803 0.028
33 20848 0.028
16 21184 0.028
2 20869 0.028
13 3262 0.028
Node Closeness Centrality
19 457 0.371
8 399 0.336
32 42094 0.319
18 456 0.316
21 459 0.308
29 41945 0.298
7 398 0.293
34 20849 0.286
4 395 0.286
9 7184 0.271
20 458 0.271
0 21121 0.261
1 21122 0.255
6 397 0.255
26 21970 0.252
3 394 0.250
35 7162 0.247
28 42329 0.243
25 21969 0.240
12 3261 0.234
31 42092 0.231
27 41944 0.231
22 20811 0.228
5 396 0.225
33 20848 0.224
36 7163 0.222
23 20812 0.222
14 3263 0.222
10 7186 0.211
2 20869 0.202
24 20813 0.193
13 3262 0.190
30 20839 0.190
11 20772 0.183
17 20803 0.183
16 21184 0.183
15 3264 0.183
Node Betweenness Centrality
19 457 0.608
8 399 0.326
7 398 0.300
32 42094 0.226
20 458 0.223
18 456 0.204
29 41945 0.164
6 397 0.159
21 459 0.129
23 20812 0.128
14 3263 0.121
9 7184 0.110
12 3261 0.110
35 7162 0.098
34 20849 0.094
4 395 0.082
26 21970 0.067
36 7163 0.048
3 394 0.046
22 20811 0.045
1 21122 0.044
5 396 0.028
0 21121 0.010
24 20813 0.007
25 21969 0.006
13 3262 0.000
11 20772 0.000
17 20803 0.000
28 42329 0.000
10 7186 0.000
30 20839 0.000
31 42092 0.000
15 3264 0.000
33 20848 0.000
16 21184 0.000
2 20869 0.000
27 41944 0.000
Node Katz Centrality
19 457 0.193
20 458 0.184
36 7163 0.176
32 42094 0.176
35 7162 0.175
29 41945 0.175
14 3263 0.174
23 20812 0.174
21 459 0.169
18 456 0.169
5 396 0.168
1 21122 0.168
3 394 0.168
4 395 0.168
22 20811 0.168
6 397 0.168
8 399 0.168
0 21121 0.168
7 398 0.167
34 20849 0.167
12 3261 0.166
26 21970 0.166
10 7186 0.160
9 7184 0.160
24 20813 0.159
25 21969 0.159
28 42329 0.151
31 42092 0.151
17 20803 0.151
16 21184 0.151
11 20772 0.151
15 3264 0.151
27 41944 0.151
13 3262 0.150
30 20839 0.150
33 20848 0.150
2 20869 0.150
-------------------------------------------------- -------------------- Graph 12 --------------------
---------- Graph Stats ---------- Nodes : 32 Edges : 32 Diameter : 9 Periphery : [2575, 2649, 2653, 42208, 2660, 2671, 2935]
Density of the graph: 0.07056451612903226
Average degree: 2.1875
Size of the largest connected component: 32
Degree assortativity coefficient: -0.5415415415415425
Node Degree Centrality
22 2652 0.129
19 2647 0.129
0 41613 0.097
10 447 0.097
27 2661 0.097
20 2648 0.097
17 592 0.097
14 449 0.097
13 450 0.097
16 591 0.097
9 446 0.097
8 445 0.097
6 40748 0.097
2 400 0.097
5 403 0.097
4 402 0.097
3 401 0.097
7 40749 0.065
11 448 0.065
25 42211 0.032
30 2935 0.032
29 2934 0.032
28 2671 0.032
26 2660 0.032
21 2649 0.032
24 42208 0.032
23 2653 0.032
18 2646 0.032
1 2575 0.032
15 451 0.032
12 2625 0.032
31 2938 0.032
Node Closeness Centrality
14 449 0.290
4 402 0.287
5 403 0.282
16 591 0.279
10 447 0.279
3 401 0.277
11 448 0.274
2 400 0.272
8 445 0.272
17 592 0.272
13 450 0.272
9 446 0.270
22 2652 0.230
19 2647 0.230
0 41613 0.225
6 40748 0.225
20 2648 0.223
27 2661 0.221
15 451 0.215
7 40749 0.205
1 2575 0.188
30 2935 0.188
29 2934 0.188
23 2653 0.188
18 2646 0.188
31 2938 0.188
24 42208 0.185
25 42211 0.185
12 2625 0.185
21 2649 0.183
26 2660 0.182
28 2671 0.182
Node Betweenness Centrality
10 447 0.328
16 591 0.320
14 449 0.278
8 445 0.276
17 592 0.273
4 402 0.267
9 446 0.255
3 401 0.234
11 448 0.218
2 400 0.206
22 2652 0.187
19 2647 0.187
5 403 0.144
27 2661 0.127
0 41613 0.127
13 450 0.113
6 40748 0.095
20 2648 0.092
7 40749 0.009
15 451 0.000
25 42211 0.000
30 2935 0.000
29 2934 0.000
28 2671 0.000
26 2660 0.000
23 2653 0.000
24 42208 0.000
1 2575 0.000
21 2649 0.000
12 2625 0.000
18 2646 0.000
31 2938 0.000
Node Katz Centrality
22 2652 0.191
19 2647 0.191
16 591 0.185
14 449 0.184
2 400 0.184
3 401 0.184
4 402 0.184
5 403 0.184
8 445 0.184
9 446 0.184
10 447 0.184
17 592 0.184
27 2661 0.183
20 2648 0.183
0 41613 0.183
13 450 0.183
6 40748 0.183
11 448 0.175
7 40749 0.175
15 451 0.166
25 42211 0.166
30 2935 0.166
29 2934 0.166
28 2671 0.166
26 2660 0.166
23 2653 0.166
24 42208 0.166
1 2575 0.166
21 2649 0.166
12 2625 0.166
18 2646 0.166
31 2938 0.166
-------------------------------------------------- -------------------- Graph 13 --------------------
---------- Graph Stats ---------- Nodes : 16 Edges : 16 Diameter : 6 Periphery : [6048, 6049, 36224, 5637, 5638, 6302]
Density of the graph: 0.175
Average degree: 2.625
Size of the largest connected component: 16
Degree assortativity coefficient: -0.17914438502674013
Node Degree Centrality
3 5636 0.267
7 6025 0.267
10 407 0.267
12 409 0.267
6 6024 0.200
8 36209 0.200
9 406 0.200
11 408 0.200
13 6300 0.200
14 6301 0.200
2 36224 0.133
4 5637 0.133
0 6048 0.067
1 6049 0.067
5 5638 0.067
15 6302 0.067
Node Closeness Centrality
10 407 0.469
12 409 0.469
9 406 0.417
11 408 0.417
3 5636 0.395
7 6025 0.395
8 36209 0.395
14 6301 0.375
6 6024 0.357
2 36224 0.341
13 6300 0.341
4 5637 0.326
1 6049 0.288
5 5638 0.288
0 6048 0.268
15 6302 0.259
Node Betweenness Centrality
10 407 0.304
12 409 0.293
7 6025 0.241
3 5636 0.236
11 408 0.192
9 406 0.190
6 6024 0.165
13 6300 0.153
8 36209 0.147
14 6301 0.118
2 36224 0.042
4 5637 0.033
0 6048 0.000
1 6049 0.000
5 5638 0.000
15 6302 0.000
Node Katz Centrality
10 407 0.268
12 409 0.268
3 5636 0.266
7 6025 0.266
8 36209 0.255
9 406 0.255
11 408 0.255
6 6024 0.254
14 6301 0.254
13 6300 0.253
2 36224 0.242
4 5637 0.242
0 6048 0.229
1 6049 0.229
5 5638 0.229
15 6302 0.229
-------------------------------------------------- -------------------- Graph 14 --------------------
---------- Graph Stats ---------- Nodes : 26 Edges : 26 Diameter : 7 Periphery : [677, 681, 699, 7755, 7756, 7787, 1023]
Density of the graph: 0.09230769230769231
Average degree: 2.3076923076923075
Size of the largest connected component: 26
Degree assortativity coefficient: -0.24746450304259682
Node Degree Centrality
20 7794 0.16
16 7757 0.16
3 413 0.16
21 755 0.16
7 417 0.16
11 682 0.12
22 7795 0.12
12 683 0.12
0 1024 0.12
8 418 0.12
6 416 0.12
5 415 0.12
4 414 0.12
2 412 0.12
15 7756 0.08
19 7793 0.04
23 756 0.04
24 758 0.04
13 699 0.04
18 7792 0.04
17 7787 0.04
14 7755 0.04
1 1025 0.04
10 681 0.04
9 677 0.04
25 1023 0.04
Node Closeness Centrality
3 413 0.391
8 418 0.373
7 417 0.357
2 412 0.347
22 7795 0.329
20 7794 0.316
4 414 0.312
6 416 0.312
21 755 0.305
16 7757 0.305
5 415 0.301
0 1024 0.278
12 683 0.272
11 682 0.269
18 7792 0.250
15 7756 0.245
17 7787 0.243
1 1025 0.240
14 7755 0.236
23 756 0.236
19 7793 0.236
24 758 0.236
25 1023 0.219
9 677 0.216
13 699 0.216
10 681 0.214
Node Betweenness Centrality
3 413 0.487
2 412 0.333
7 417 0.319
8 418 0.264
21 755 0.230
20 7794 0.186
6 416 0.180
16 7757 0.169
12 683 0.157
4 414 0.147
22 7795 0.144
5 415 0.117
0 1024 0.100
11 682 0.080
15 7756 0.014
23 756 0.000
19 7793 0.000
24 758 0.000
13 699 0.000
18 7792 0.000
17 7787 0.000
14 7755 0.000
1 1025 0.000
10 681 0.000
9 677 0.000
25 1023 0.000
Node Katz Centrality
20 7794 0.213
3 413 0.213
16 7757 0.213
7 417 0.213
21 755 0.211
8 418 0.204
2 412 0.203
4 414 0.203
5 415 0.203
22 7795 0.203
11 682 0.202
0 1024 0.202
6 416 0.202
12 683 0.201
15 7756 0.193
23 756 0.183
19 7793 0.183
24 758 0.183
13 699 0.183
18 7792 0.183
17 7787 0.183
14 7755 0.183
1 1025 0.183
10 681 0.183
9 677 0.183
25 1023 0.183
-------------------------------------------------- -------------------- Graph 15 --------------------
---------- Graph Stats ---------- Nodes : 19 Edges : 19 Diameter : 6 Periphery : [39690, 40848, 40853, 39978, 33467, 33469, 15712, 15714]
Density of the graph: 0.1286549707602339
Average degree: 2.3157894736842106
Size of the largest connected component: 19
Degree assortativity coefficient: -0.3628318584070792
Node Degree Centrality
9 439 0.222
17 15713 0.222
5 20655 0.222
8 438 0.222
13 23896 0.222
11 33468 0.222
15 23898 0.167
6 436 0.167
7 437 0.167
14 23897 0.111
12 33469 0.056
16 15712 0.056
0 39690 0.056
10 33467 0.056
1 40848 0.056
4 39978 0.056
3 39962 0.056
2 40853 0.056
18 15714 0.056
Node Closeness Centrality
8 438 0.450
7 437 0.429
9 439 0.419
5 20655 0.400
6 436 0.400
17 15713 0.353
13 23896 0.346
11 33468 0.340
15 23898 0.321
14 23897 0.305
3 39962 0.290
16 15712 0.265
18 15714 0.265
1 40848 0.265
4 39978 0.261
12 33469 0.257
10 33467 0.257
0 39690 0.257
2 40853 0.247
Node Betweenness Centrality
8 438 0.491
7 437 0.415
17 15713 0.314
11 33468 0.314
6 436 0.228
5 20655 0.182
9 439 0.181
13 23896 0.176
15 23898 0.150
14 23897 0.039
12 33469 0.000
16 15712 0.000
0 39690 0.000
10 33467 0.000
1 40848 0.000
4 39978 0.000
3 39962 0.000
2 40853 0.000
18 15714 0.000
Node Katz Centrality
9 439 0.251
8 438 0.250
5 20655 0.249
13 23896 0.248
17 15713 0.246
11 33468 0.245
7 437 0.238
6 436 0.237
15 23898 0.235
14 23897 0.226
12 33469 0.214
16 15712 0.214
0 39690 0.214
10 33467 0.214
1 40848 0.214
4 39978 0.214
3 39962 0.214
18 15714 0.214
2 40853 0.213
-------------------------------------------------- -------------------- Graph 16 --------------------
---------- Graph Stats ---------- Nodes : 26 Edges : 26 Diameter : 6 Periphery : [42134, 40104, 40110, 20534, 41917, 5312, 5313, 20554, 20556, 20572, 20716, 20723, 20725]
Density of the graph: 0.08923076923076922
Average degree: 2.230769230769231
Size of the largest connected component: 26
Degree assortativity coefficient: -0.3205828779599262
Node Degree Centrality
19 20571 0.16
18 467 0.16
16 465 0.16
15 464 0.16
23 20718 0.16
1 25505 0.16
14 463 0.12
11 5315 0.12
10 5314 0.12
17 466 0.12
6 41916 0.12
3 40105 0.12
21 20576 0.08
12 20554 0.08
20 20572 0.04
22 20716 0.04
24 20723 0.04
0 42134 0.04
13 20556 0.04
9 5313 0.04
8 5312 0.04
7 41917 0.04
5 20534 0.04
4 40110 0.04
2 40104 0.04
25 20725 0.04
Node Closeness Centrality
18 467 0.397
15 464 0.397
14 463 0.397
16 465 0.373
17 466 0.362
19 20571 0.316
11 5315 0.312
6 41916 0.312
23 20718 0.309
1 25505 0.309
10 5314 0.301
3 40105 0.287
21 20576 0.281
12 20554 0.253
20 20572 0.243
25 20725 0.243
9 5313 0.240
7 41917 0.240
22 20716 0.238
24 20723 0.238
13 20556 0.238
5 20534 0.238
8 5312 0.234
0 42134 0.234
4 40110 0.225
2 40104 0.225
Node Betweenness Centrality
18 467 0.463
15 464 0.415
14 463 0.378
16 465 0.302
19 20571 0.188
23 20718 0.188
1 25505 0.188
17 466 0.173
10 5314 0.157
3 40105 0.157
11 5315 0.115
6 41916 0.080
21 20576 0.020
12 20554 0.015
20 20572 0.000
22 20716 0.000
24 20723 0.000
0 42134 0.000
13 20556 0.000
9 5313 0.000
8 5312 0.000
7 41917 0.000
5 20534 0.000
4 40110 0.000
2 40104 0.000
25 20725 0.000
Node Katz Centrality
18 467 0.215
16 465 0.214
15 464 0.214
23 20718 0.212
1 25505 0.212
19 20571 0.211
14 463 0.205
17 466 0.205
11 5315 0.203
6 41916 0.203
10 5314 0.202
3 40105 0.202
21 20576 0.194
12 20554 0.194
20 20572 0.184
22 20716 0.184
24 20723 0.184
13 20556 0.184
25 20725 0.184
5 20534 0.184
9 5313 0.183
8 5312 0.183
7 41917 0.183
4 40110 0.183
2 40104 0.183
0 42134 0.183
-------------------------------------------------- -------------------- Graph 17 --------------------
---------- Graph Stats ---------- Nodes : 23 Edges : 23 Diameter : 6 Periphery : [6679, 6682, 6953, 6699, 6605, 6606, 6620, 6621, 6893]
Density of the graph: 0.11857707509881422
Average degree: 2.608695652173913
Size of the largest connected component: 23
Degree assortativity coefficient: -0.4300518134715037
Node Degree Centrality
0 512 0.182
6 6684 0.182
13 6604 0.182
8 6696 0.182
7 6685 0.182
22 511 0.182
5 6683 0.182
3 6681 0.182
16 6616 0.136
21 510 0.136
20 509 0.136
1 513 0.136
18 6621 0.091
17 6620 0.091
14 6605 0.091
2 6679 0.091
11 6700 0.091
15 6606 0.045
4 6682 0.045
12 6963 0.045
19 6893 0.045
10 6699 0.045
9 6953 0.045
Node Closeness Centrality
0 512 0.423
22 511 0.423
20 509 0.386
1 513 0.386
21 510 0.373
6 6684 0.367
5 6683 0.349
8 6696 0.349
7 6685 0.338
13 6604 0.338
3 6681 0.328
16 6616 0.324
11 6700 0.310
18 6621 0.297
2 6679 0.297
14 6605 0.297
17 6620 0.289
12 6963 0.272
19 6893 0.262
9 6953 0.262
15 6606 0.256
10 6699 0.256
4 6682 0.250
Node Betweenness Centrality
0 512 0.314
22 511 0.283
6 6684 0.196
7 6685 0.189
5 6683 0.178
8 6696 0.174
13 6604 0.171
3 6681 0.163
1 513 0.154
20 509 0.130
21 510 0.129
16 6616 0.085
2 6679 0.071
18 6621 0.047
14 6605 0.040
11 6700 0.032
17 6620 0.025
15 6606 0.000
10 6699 0.000
19 6893 0.000
9 6953 0.000
4 6682 0.000
12 6963 0.000
Node Katz Centrality
0 512 0.224
22 511 0.224
5 6683 0.222
6 6684 0.222
7 6685 0.222
8 6696 0.222
3 6681 0.221
13 6604 0.221
21 510 0.213
20 509 0.213
1 513 0.213
16 6616 0.211
2 6679 0.202
18 6621 0.202
17 6620 0.202
11 6700 0.202
14 6605 0.202
15 6606 0.191
10 6699 0.191
19 6893 0.191
9 6953 0.191
4 6682 0.191
12 6963 0.191
-------------------------------------------------- -------------------- Graph 18 --------------------
---------- Graph Stats ---------- Nodes : 19 Edges : 19 Diameter : 5 Periphery : [5890, 5896, 5893, 5902, 1118, 5854, 5862, 5864, 5874, 5882]
Density of the graph: 0.1286549707602339
Average degree: 2.3157894736842106
Size of the largest connected component: 19
Degree assortativity coefficient: -0.24768518518518623
Node Degree Centrality
2 516 0.278
0 514 0.222
12 1119 0.222
17 5883 0.222
18 5884 0.222
4 5894 0.222
1 515 0.167
11 1120 0.167
15 5874 0.111
9 1118 0.111
5 5890 0.056
6 5896 0.056
7 5893 0.056
8 5902 0.056
10 5854 0.056
13 5862 0.056
14 5864 0.056
16 5882 0.056
3 5892 0.056
Node Closeness Centrality
2 516 0.514
0 514 0.462
1 515 0.439
4 5894 0.400
18 5884 0.400
17 5883 0.391
12 1119 0.375
11 1120 0.353
3 5892 0.321
15 5874 0.321
9 1118 0.300
10 5854 0.290
13 5862 0.290
14 5864 0.290
7 5893 0.286
16 5882 0.286
5 5890 0.277
6 5896 0.277
8 5902 0.265
Node Betweenness Centrality
2 516 0.608
0 514 0.359
12 1119 0.261
17 5883 0.248
4 5894 0.216
1 515 0.190
18 5884 0.163
11 1120 0.150
9 1118 0.039
15 5874 0.020
7 5893 0.000
8 5902 0.000
6 5896 0.000
10 5854 0.000
5 5890 0.000
13 5862 0.000
14 5864 0.000
16 5882 0.000
3 5892 0.000
Node Katz Centrality
2 516 0.263
0 514 0.249
18 5884 0.249
4 5894 0.248
17 5883 0.247
12 1119 0.246
1 515 0.238
11 1120 0.235
15 5874 0.226
9 1118 0.225
3 5892 0.214
5 5890 0.214
6 5896 0.214
7 5893 0.214
10 5854 0.214
13 5862 0.214
14 5864 0.214
16 5882 0.214
8 5902 0.213
-------------------------------------------------- -------------------- Graph 19 --------------------
---------- Graph Stats ---------- Nodes : 17 Edges : 17 Diameter : 6 Periphery : [8156, 8148, 8124]
Density of the graph: 0.16176470588235295
Average degree: 2.588235294117647
Size of the largest connected component: 17
Degree assortativity coefficient: -0.13304721030042904
Node Degree Centrality
12 8153 0.312
2 519 0.250
3 520 0.250
14 8155 0.250
6 8145 0.250
1 518 0.250
0 517 0.188
13 8154 0.188
7 8146 0.188
11 8152 0.125
8 8147 0.125
10 8151 0.062
9 8148 0.062
5 8156 0.062
4 8137 0.062
15 8124 0.062
16 8157 0.062
Node Closeness Centrality
2 519 0.471
0 517 0.457
3 520 0.457
1 518 0.457
12 8153 0.444
14 8155 0.410
6 8145 0.381
11 8152 0.372
13 8154 0.364
7 8146 0.364
8 8147 0.320
10 8151 0.314
16 8157 0.296
9 8148 0.281
15 8124 0.281
5 8156 0.271
4 8137 0.271
Node Betweenness Centrality
1 518 0.300
0 517 0.263
2 519 0.262
12 8153 0.246
6 8145 0.242
3 520 0.188
14 8155 0.175
13 8154 0.175
7 8146 0.175
11 8152 0.033
8 8147 0.033
10 8151 0.000
9 8148 0.000
5 8156 0.000
4 8137 0.000
15 8124 0.000
16 8157 0.000
Node Katz Centrality
12 8153 0.271
3 520 0.262
2 519 0.261
1 518 0.260
14 8155 0.258
6 8145 0.258
0 517 0.248
13 8154 0.245
7 8146 0.245
11 8152 0.236
8 8147 0.234
10 8151 0.223
9 8148 0.222
5 8156 0.222
4 8137 0.222
15 8124 0.222
16 8157 0.222
-------------------------------------------------- -------------------- Graph 20 --------------------
---------- Graph Stats ---------- Nodes : 34 Edges : 34 Diameter : 8 Periphery : [5424, 5447, 5367, 5368]
Density of the graph: 0.0748663101604278
Average degree: 2.4705882352941178
Size of the largest connected component: 34
Degree assortativity coefficient: -0.4439461883408069
Node Degree Centrality
26 5444 0.121
23 5438 0.121
1 528 0.121
4 531 0.121
5 532 0.121
15 5423 0.121
7 534 0.121
13 5421 0.121
20 5433 0.121
11 5418 0.121
0 527 0.091
25 5443 0.091
19 5432 0.091
8 535 0.091
6 533 0.091
3 530 0.091
2 529 0.091
31 5450 0.061
24 5442 0.061
30 5449 0.061
17 5424 0.061
14 5422 0.061
10 5417 0.061
21 5436 0.030
22 5437 0.030
18 5431 0.030
16 7984 0.030
12 5420 0.030
27 5445 0.030
28 5447 0.030
29 5448 0.030
9 5391 0.030
32 5367 0.030
33 5368 0.030
Node Closeness Centrality
1 528 0.363
0 527 0.344
7 534 0.333
4 531 0.320
5 532 0.308
2 529 0.303
8 535 0.300
19 5432 0.297
3 530 0.292
6 533 0.287
20 5433 0.277
23 5438 0.268
13 5421 0.268
26 5444 0.264
11 5418 0.262
14 5422 0.262
15 5423 0.248
25 5443 0.244
30 5449 0.241
10 5417 0.241
24 5442 0.232
31 5450 0.228
17 5424 0.224
21 5436 0.219
18 5431 0.219
22 5437 0.213
16 7984 0.213
12 5420 0.213
9 5391 0.213
27 5445 0.210
29 5448 0.210
33 5368 0.209
32 5367 0.200
28 5447 0.198
Node Betweenness Centrality
1 528 0.364
7 534 0.347
5 532 0.254
0 527 0.252
4 531 0.219
8 535 0.191
26 5444 0.162
23 5438 0.155
20 5433 0.145
2 529 0.140
6 533 0.138
13 5421 0.136
11 5418 0.133
19 5432 0.122
3 530 0.099
15 5423 0.098
25 5443 0.078
10 5417 0.053
14 5422 0.044
17 5424 0.031
30 5449 0.016
24 5442 0.011
31 5450 0.009
18 5431 0.000
21 5436 0.000
22 5437 0.000
16 7984 0.000
12 5420 0.000
9 5391 0.000
27 5445 0.000
28 5447 0.000
29 5448 0.000
32 5367 0.000
33 5368 0.000
Node Katz Centrality
7 534 0.186
1 528 0.186
4 531 0.185
5 532 0.184
11 5418 0.183
15 5423 0.183
20 5433 0.183
13 5421 0.183
26 5444 0.183
23 5438 0.183
0 527 0.177
19 5432 0.177
3 530 0.177
6 533 0.176
2 529 0.176
8 535 0.176
25 5443 0.175
17 5424 0.168
14 5422 0.168
10 5417 0.168
24 5442 0.167
30 5449 0.167
31 5450 0.167
18 5431 0.159
16 7984 0.159
21 5436 0.159
22 5437 0.159
12 5420 0.159
9 5391 0.159
27 5445 0.159
29 5448 0.159
32 5367 0.159
33 5368 0.159
28 5447 0.158
-------------------------------------------------- -------------------- Graph 21 --------------------
---------- Graph Stats ---------- Nodes : 13 Edges : 13 Diameter : 5 Periphery : [4480, 4487, 4484, 4476]
Density of the graph: 0.19230769230769232
Average degree: 2.3076923076923075
Size of the largest connected component: 13
Degree assortativity coefficient: -0.4285714285714284
Node Degree Centrality
0 544 0.333
4 4481 0.333
9 4371 0.333
11 4373 0.333
1 545 0.250
2 546 0.167
3 547 0.167
10 4372 0.167
5 4485 0.083
6 4480 0.083
7 4487 0.083
8 4484 0.083
12 4476 0.083
Node Closeness Centrality
0 544 0.545
11 4373 0.522
1 545 0.480
4 4481 0.462
9 4371 0.444
10 4372 0.429
2 546 0.387
3 547 0.353
5 4485 0.353
6 4480 0.324
8 4484 0.324
7 4487 0.316
12 4476 0.316
Node Betweenness Centrality
0 544 0.414
11 4373 0.375
4 4481 0.352
9 4371 0.344
1 545 0.204
10 4372 0.091
2 546 0.046
3 547 0.023
5 4485 0.000
6 4480 0.000
7 4487 0.000
8 4484 0.000
12 4476 0.000
Node Katz Centrality
0 544 0.302
11 4373 0.300
4 4481 0.299
9 4371 0.298
1 545 0.287
10 4372 0.274
2 546 0.272
3 547 0.272
5 4485 0.259
6 4480 0.259
7 4487 0.259
8 4484 0.259
12 4476 0.259
-------------------------------------------------- -------------------- Graph 22 --------------------
---------- Graph Stats ---------- Nodes : 52 Edges : 52 Diameter : 30 Periphery : [37004, 37005, 37015, 37018, 37019, 2024]
Density of the graph: 0.04524886877828054
Average degree: 2.3076923076923075
Size of the largest connected component: 52
Degree assortativity coefficient: 0.19852602487333107
Node Degree Centrality
27 566 0.078
21 560 0.078
15 554 0.078
0 37003 0.059
17 556 0.059
50 2025 0.059
48 2023 0.059
47 36197 0.059
30 569 0.059
28 567 0.059
25 564 0.059
24 563 0.059
23 562 0.059
20 559 0.059
19 558 0.059
18 557 0.059
26 565 0.059
16 555 0.059
10 1189 0.059
5 37017 0.059
14 553 0.059
12 551 0.059
13 552 0.059
49 2024 0.039
45 590 0.039
44 589 0.039
43 588 0.039
35 574 0.039
41 580 0.039
40 579 0.039
39 578 0.039
38 577 0.039
37 576 0.039
36 575 0.039
42 587 0.039
34 573 0.039
33 572 0.039
32 571 0.039
31 570 0.039
29 568 0.039
1 37004 0.039
22 561 0.039
6 37018 0.020
7 37019 0.020
8 37020 0.020
9 1187 0.020
46 36196 0.020
4 37016 0.020
3 37015 0.020
11 1190 0.020
2 37005 0.020
51 36207 0.020
Node Closeness Centrality
34 573 0.107
38 577 0.107
36 575 0.106
29 568 0.106
37 576 0.105
22 561 0.105
43 588 0.104
18 557 0.104
15 554 0.102
45 590 0.102
42 587 0.100
17 556 0.099
14 553 0.098
41 580 0.098
35 574 0.096
13 552 0.096
16 555 0.095
12 551 0.093
10 1189 0.093
33 572 0.093
47 36197 0.090
31 570 0.090
20 559 0.088
32 571 0.087
11 1190 0.085
9 1187 0.085
44 589 0.084
46 36196 0.083
21 560 0.083
19 558 0.083
51 36207 0.083
39 578 0.080
48 2023 0.077
50 2025 0.077
40 579 0.077
0 37003 0.077
30 569 0.074
1 37004 0.072
3 37015 0.072
49 2024 0.072
2 37005 0.072
27 566 0.071
26 565 0.071
28 567 0.067
25 564 0.067
23 562 0.067
24 563 0.064
8 37020 0.063
4 37016 0.063
5 37017 0.060
7 37019 0.057
6 37018 0.057
Node Betweenness Centrality
34 573 0.510
38 577 0.510
36 575 0.508
29 568 0.508
37 576 0.505
22 561 0.505
18 557 0.503
43 588 0.500
45 590 0.494
42 587 0.486
41 580 0.477
35 574 0.466
33 572 0.453
31 570 0.439
32 571 0.424
44 589 0.406
39 578 0.387
40 579 0.367
15 554 0.353
30 569 0.345
12 551 0.326
20 559 0.296
14 553 0.277
27 566 0.165
17 556 0.165
21 560 0.160
13 552 0.148
26 565 0.132
24 563 0.116
25 564 0.107
19 558 0.089
5 37017 0.078
47 36197 0.078
10 1189 0.078
23 562 0.075
48 2023 0.057
0 37003 0.057
28 567 0.039
50 2025 0.039
16 555 0.006
49 2024 0.003
1 37004 0.002
11 1190 0.000
9 1187 0.000
8 37020 0.000
7 37019 0.000
6 37018 0.000
4 37016 0.000
46 36196 0.000
3 37015 0.000
2 37005 0.000
51 36207 0.000
Node Katz Centrality
21 560 0.151
15 554 0.151
27 566 0.151
26 565 0.144
17 556 0.144
16 555 0.144
14 553 0.144
13 552 0.144
12 551 0.144
20 559 0.144
23 562 0.144
19 558 0.144
24 563 0.144
28 567 0.144
30 569 0.144
18 557 0.144
25 564 0.143
48 2023 0.143
50 2025 0.143
0 37003 0.143
10 1189 0.143
47 36197 0.142
5 37017 0.142
49 2024 0.137
1 37004 0.137
36 575 0.136
35 574 0.136
43 588 0.136
42 587 0.136
41 580 0.136
40 579 0.136
39 578 0.136
38 577 0.136
37 576 0.136
32 571 0.136
34 573 0.136
33 572 0.136
45 590 0.136
31 570 0.136
29 568 0.136
22 561 0.136
44 589 0.136
46 36196 0.129
3 37015 0.129
2 37005 0.129
11 1190 0.129
4 37016 0.129
6 37018 0.129
7 37019 0.129
8 37020 0.129
9 1187 0.129
51 36207 0.129
-------------------------------------------------- -------------------- Graph 23 --------------------
---------- Graph Stats ---------- Nodes : 19 Edges : 19 Diameter : 6 Periphery : [22151, 21926, 21927, 31944, 22106, 22108, 17398]
Density of the graph: 0.13450292397660818
Average degree: 2.4210526315789473
Size of the largest connected component: 19
Degree assortativity coefficient: -0.07430997876857752
Node Degree Centrality
8 585 0.333
9 586 0.167
17 22113 0.167
3 944 0.167
4 581 0.167
5 582 0.167
6 583 0.167
15 22107 0.167
11 22098 0.167
12 22099 0.167
13 22105 0.167
7 584 0.111
16 22108 0.111
14 22106 0.056
0 22151 0.056
10 31944 0.056
1 21926 0.056
2 21927 0.056
18 17398 0.056
Node Closeness Centrality
8 585 0.462
7 584 0.409
9 586 0.391
6 583 0.383
3 944 0.367
5 582 0.367
13 22105 0.346
15 22107 0.340
17 22113 0.340
4 581 0.333
12 22099 0.310
11 22098 0.300
10 31944 0.273
16 22108 0.261
18 17398 0.261
14 22106 0.261
1 21926 0.240
2 21927 0.234
0 22151 0.234
Node Betweenness Centrality
8 585 0.618
6 583 0.340
7 584 0.271
9 586 0.216
11 22098 0.216
13 22105 0.216
5 582 0.186
3 944 0.111
12 22099 0.111
4 581 0.108
17 22113 0.052
15 22107 0.052
14 22106 0.000
16 22108 0.000
0 22151 0.000
10 31944 0.000
1 21926 0.000
2 21927 0.000
18 17398 0.000
Node Katz Centrality
8 585 0.271
9 586 0.237
17 22113 0.237
15 22107 0.237
3 944 0.236
4 581 0.236
5 582 0.236
6 583 0.235
12 22099 0.235
13 22105 0.235
11 22098 0.233
7 584 0.226
16 22108 0.224
14 22106 0.212
0 22151 0.212
10 31944 0.212
1 21926 0.212
2 21927 0.212
18 17398 0.212
-------------------------------------------------- -------------------- Graph 24 --------------------
---------- Graph Stats ---------- Nodes : 8 Edges : 8 Diameter : 4 Periphery : [593, 36021, 36017, 36022]
Density of the graph: 0.2857142857142857
Average degree: 2.0
Size of the largest connected component: 8
Degree assortativity coefficient: -0.3333333333333333
Node Degree Centrality
1 594 0.429
2 595 0.429
3 596 0.429
5 36020 0.429
0 593 0.143
4 36021 0.143
6 36017 0.143
7 36022 0.143
Node Closeness Centrality
2 595 0.636
1 594 0.538
3 596 0.538
5 36020 0.538
0 593 0.368
4 36021 0.368
6 36017 0.368
7 36022 0.368
Node Betweenness Centrality
2 595 0.571
5 36020 0.524
1 594 0.286
3 596 0.286
0 593 0.000
4 36021 0.000
6 36017 0.000
7 36022 0.000
Node Katz Centrality
2 595 0.372
1 594 0.371
3 596 0.371
5 36020 0.369
0 593 0.335
4 36021 0.335
6 36017 0.335
7 36022 0.335
-------------------------------------------------- -------------------- Graph 25 --------------------
---------- Graph Stats ---------- Nodes : 15 Edges : 15 Diameter : 5 Periphery : [6858, 7250, 6007, 7351, 7067, 7068, 7261, 7263]
Density of the graph: 0.1523809523809524
Average degree: 2.1333333333333333
Size of the largest connected component: 15
Degree assortativity coefficient: -0.3333333333333333
Node Degree Centrality
6 597 0.286
10 7066 0.286
0 6851 0.214
1 599 0.214
3 6859 0.214
5 7251 0.214
7 598 0.214
14 7263 0.143
2 6858 0.071
4 7250 0.071
8 6007 0.071
9 7351 0.071
11 7067 0.071
12 7068 0.071
13 7261 0.071
Node Closeness Centrality
6 597 0.500
7 598 0.467
1 599 0.452
5 7251 0.412
10 7066 0.400
0 6851 0.378
3 6859 0.350
14 7263 0.350
4 7250 0.298
9 7351 0.292
12 7068 0.292
8 6007 0.280
13 7261 0.280
2 6858 0.264
11 7067 0.264
Node Betweenness Centrality
6 597 0.495
1 599 0.363
10 7066 0.308
7 598 0.286
0 6851 0.275
3 6859 0.275
5 7251 0.209
14 7263 0.066
2 6858 0.000
4 7250 0.000
8 6007 0.000
9 7351 0.000
11 7067 0.000
12 7068 0.000
13 7261 0.000
Node Katz Centrality
6 597 0.283
10 7066 0.280
7 598 0.271
1 599 0.270
5 7251 0.269
0 6851 0.268
3 6859 0.267
14 7263 0.257
2 6858 0.243
4 7250 0.243
8 6007 0.243
9 7351 0.243
11 7067 0.243
12 7068 0.243
13 7261 0.243
-------------------------------------------------- -------------------- Graph 26 --------------------
---------- Graph Stats ---------- Nodes : 20 Edges : 20 Diameter : 6 Periphery : [3469, 3473, 3478, 3497, 3504, 3439, 3451, 3453]
Density of the graph: 0.13157894736842105
Average degree: 2.5
Size of the largest connected component: 20
Degree assortativity coefficient: -0.3888888888888894
Node Degree Centrality
7 3484 0.263
10 3498 0.211
1 3470 0.211
5 664 0.211
13 601 0.211
12 600 0.211
18 3452 0.158
15 603 0.158
4 663 0.158
14 602 0.158
0 3469 0.105
8 3494 0.105
6 665 0.105
11 3504 0.053
9 3497 0.053
3 3478 0.053
16 3439 0.053
17 3451 0.053
2 3473 0.053
19 3453 0.053
Node Closeness Centrality
12 600 0.452
13 601 0.442
15 603 0.404
14 602 0.396
10 3498 0.388
7 3484 0.380
1 3470 0.365
4 663 0.358
8 3494 0.352
18 3452 0.345
5 664 0.333
6 665 0.311
0 3469 0.302
11 3504 0.284
9 3497 0.279
3 3478 0.279
2 3473 0.271
19 3453 0.260
16 3439 0.253
17 3451 0.253
Node Betweenness Centrality
12 600 0.338
13 601 0.285
15 603 0.277
7 3484 0.270
5 664 0.228
1 3470 0.194
14 602 0.180
10 3498 0.177
18 3452 0.137
4 663 0.104
8 3494 0.066
6 665 0.035
0 3469 0.018
11 3504 0.000
9 3497 0.000
3 3478 0.000
16 3439 0.000
17 3451 0.000
2 3473 0.000
19 3453 0.000
Node Katz Centrality
7 3484 0.250
13 601 0.242
12 600 0.241
10 3498 0.240
1 3470 0.238
5 664 0.237
15 603 0.230
18 3452 0.229
14 602 0.229
4 663 0.228
0 3469 0.218
8 3494 0.218
6 665 0.218
9 3497 0.207
3 3478 0.207
11 3504 0.206
16 3439 0.206
17 3451 0.206
2 3473 0.206
19 3453 0.206
-------------------------------------------------- -------------------- Graph 27 --------------------
---------- Graph Stats ---------- Nodes : 19 Edges : 19 Diameter : 6 Periphery : [674, 41892, 692, 36182, 36190, 41825]
Density of the graph: 0.1286549707602339
Average degree: 2.3157894736842106
Size of the largest connected component: 19
Degree assortativity coefficient: -0.3699633699633703
Node Degree Centrality
10 36183 0.222
3 675 0.222
4 676 0.222
11 604 0.222
18 607 0.167
17 41826 0.167
15 608 0.167
14 606 0.167
1 673 0.167
12 605 0.111
0 672 0.111
8 36179 0.111
7 695 0.056
13 36190 0.056
6 692 0.056
5 41892 0.056
16 41825 0.056
2 674 0.056
9 36182 0.056
Node Closeness Centrality
11 604 0.462
14 606 0.429
4 676 0.419
18 607 0.391
15 608 0.391
3 675 0.383
12 605 0.375
10 36183 0.360
8 36179 0.333
1 673 0.333
17 41826 0.327
0 672 0.327
7 695 0.300
6 692 0.281
13 36190 0.269
9 36182 0.269
2 674 0.254
5 41892 0.250
16 41825 0.250
Node Betweenness Centrality
11 604 0.387
14 606 0.383
4 676 0.279
3 675 0.237
10 36183 0.237
17 41826 0.216
18 607 0.209
1 673 0.144
15 608 0.087
0 672 0.065
8 36179 0.049
12 605 0.026
7 695 0.000
13 36190 0.000
6 692 0.000
5 41892 0.000
16 41825 0.000
2 674 0.000
9 36182 0.000
Node Katz Centrality
11 604 0.250
4 676 0.249
3 675 0.248
10 36183 0.247
14 606 0.238
18 607 0.237
15 608 0.237
1 673 0.236
17 41826 0.235
12 605 0.226
0 672 0.226
8 36179 0.226
7 695 0.214
13 36190 0.214
6 692 0.214
5 41892 0.214
16 41825 0.214
2 674 0.214
9 36182 0.214
-------------------------------------------------- -------------------- Graph 28 --------------------
---------- Graph Stats ---------- Nodes : 26 Edges : 26 Diameter : 9 Periphery : [768, 109371, 109373]
Density of the graph: 0.08923076923076922
Average degree: 2.230769230769231
Size of the largest connected component: 26
Degree assortativity coefficient: -0.4846416382252563
Node Degree Centrality
2 661 0.16
3 662 0.16
5 37031 0.16
14 836 0.16
25 624 0.12
16 615 0.12
7 1494580 0.12
21 620 0.12
20 619 0.12
19 618 0.12
17 616 0.12
24 623 0.08
23 622 0.08
22 621 0.08
18 617 0.08
13 834 0.08
1 36225 0.08
15 139985 0.04
12 109373 0.04
11 109372 0.04
10 109371 0.04
9 1494587 0.04
8 1494584 0.04
6 37033 0.04
4 37030 0.04
0 768 0.04
Node Closeness Centrality
19 618 0.309
18 617 0.301
16 615 0.294
20 619 0.287
21 620 0.278
17 616 0.275
25 624 0.266
22 621 0.260
7 1494580 0.258
23 622 0.255
5 37031 0.253
24 623 0.250
2 661 0.243
3 662 0.236
1 36225 0.236
14 836 0.234
13 834 0.216
8 1494584 0.207
9 1494587 0.203
6 37033 0.203
4 37030 0.203
10 109371 0.197
15 139985 0.192
11 109372 0.192
12 109373 0.191
0 768 0.191
Node Betweenness Centrality
19 618 0.450
16 615 0.322
18 617 0.317
21 620 0.302
20 619 0.297
5 37031 0.230
25 624 0.208
3 662 0.185
14 836 0.183
2 661 0.182
17 616 0.182
22 621 0.168
24 623 0.160
23 622 0.160
7 1494580 0.148
1 36225 0.043
13 834 0.010
15 139985 0.000
12 109373 0.000
11 109372 0.000
10 109371 0.000
9 1494587 0.000
8 1494584 0.000
6 37033 0.000
4 37030 0.000
0 768 0.000
Node Katz Centrality
2 661 0.214
3 662 0.213
14 836 0.212
5 37031 0.211
25 624 0.204
21 620 0.204
19 618 0.204
17 616 0.204
20 619 0.203
7 1494580 0.203
16 615 0.203
18 617 0.194
13 834 0.194
1 36225 0.193
22 621 0.193
23 622 0.193
24 623 0.193
12 109373 0.184
15 139985 0.184
11 109372 0.184
10 109371 0.184
9 1494587 0.184
8 1494584 0.184
6 37033 0.184
4 37030 0.184
0 768 0.184
-------------------------------------------------- -------------------- Graph 29 --------------------
---------- Graph Stats ---------- Nodes : 15 Edges : 15 Diameter : 8 Periphery : [12654, 12655, 631, 12794, 12604, 639]
Density of the graph: 0.13333333333333333
Average degree: 1.8666666666666667
Size of the largest connected component: 15
Degree assortativity coefficient: -0.3162393162393155
Node Degree Centrality
1 648 0.214
2 12653 0.214
5 625 0.214
9 629 0.214
0 12608 0.143
6 626 0.143
7 627 0.143
8 628 0.143
10 630 0.143
3 12654 0.071
4 12655 0.071
11 631 0.071
12 12794 0.071
13 12604 0.071
14 639 0.071
Node Closeness Centrality
6 626 0.341
5 625 0.333
7 627 0.333
8 628 0.311
9 629 0.280
1 648 0.275
2 12653 0.275
0 12608 0.230
10 630 0.230
3 12654 0.219
4 12655 0.219
12 12794 0.219
14 639 0.219
11 631 0.189
13 12604 0.189
Node Betweenness Centrality
5 625 0.626
6 626 0.538
7 627 0.527
8 628 0.495
9 629 0.484
1 648 0.275
2 12653 0.275
0 12608 0.143
10 630 0.143
3 12654 0.000
4 12655 0.000
11 631 0.000
12 12794 0.000
13 12604 0.000
14 639 0.000
Node Katz Centrality
5 625 0.274
1 648 0.272
2 12653 0.272
9 629 0.272
6 626 0.260
7 627 0.260
8 628 0.260
0 12608 0.259
10 630 0.259
3 12654 0.247
4 12655 0.247
12 12794 0.247
14 639 0.247
11 631 0.246
13 12604 0.246
--------------------------------------------------
print(f"Largest connected component : {max(nx.connected_components(G), key=len)}")
Largest connected component : {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 37048, 821, 37050, 822, 37051, 823, 37052, 824, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 2146, 36963, 36964, 36966, 36967, 104, 105, 106, 36971, 108, 109, 110, 111, 112, 113, 114, 107, 36974, 36975, 116, 119, 118, 117, 115, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 36992, 36993, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 2203, 2204, 2202, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 2220, 175, 176, 177, 178, 179, 180, 181, 182, 183, 2229, 37049, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 2243, 2244, 2246, 37054, 2248, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 37075, 37074, 2258, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 37053, 37043, 4414, 327, 331, 332, 333, 338, 339, 340, 341, 342, 343, 344, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 37056, 894, 404, 405, 895, 410, 411, 896, 897, 419, 420, 422, 423, 424, 425, 426, 427, 432, 433, 434, 435, 994, 37044, 440, 441, 442, 443, 444, 452, 453, 454, 455, 460, 461, 462, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 833, 996, 2132, 913, 914, 43513, 834, 915, 521, 522, 523, 524, 525, 526, 918, 835, 536, 537, 538, 539, 540, 541, 542, 543, 548, 549, 550, 37415, 999, 37045, 927, 928, 929, 930, 35405, 931, 932, 2155, 120, 604, 605, 606, 2156, 121, 608, 607, 2157, 122, 615, 616, 617, 2158, 619, 620, 621, 618, 622, 623, 624, 819, 2161, 37498, 661, 662, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 41646, 41647, 37046, 41649, 41650, 691, 692, 693, 694, 695, 690, 697, 696, 953, 698, 41659, 702, 703, 954, 705, 706, 704, 707, 955, 709, 711, 712, 713, 2177, 956, 714, 715, 718, 2178, 720, 719, 721, 717, 716, 139985, 139986, 727, 728, 729, 730, 731, 732, 733, 2181, 735, 734, 737, 738, 2182, 739, 736, 740, 741, 960, 742, 743, 746, 744, 745, 41711, 41712, 41713, 41714, 41715, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 968, 775, 776, 777, 2190, 969, 109323, 845, 781, 779, 156, 785, 787, 786, 789, 157, 971, 41752, 41753, 41754, 41755, 41756, 41757, 41758, 41759, 41760, 41761, 41762, 41763, 41764, 2194, 2195, 805, 803, 806, 810, 811, 812, 813, 814, 815, 807, 816, 2196, 37047, 818, 817, 2197, 2198, 109359, 109361, 820, 826, 828, 829, 979, 830, 831, 832, 827, 980, 836, 837, 838, 839, 981, 841, 840, 843, 844, 842, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 41823, 41824, 41825, 41826, 867, 868, 869, 870, 871, 872, 873, 874, 875, 174, 877, 876, 35695, 35696, 35698, 35699, 883, 885, 886, 35703, 884, 887, 890, 889, 891, 35709, 35710, 888, 892, 893, 898, 899, 900, 35717, 902, 903, 901, 904, 905, 907, 908, 909, 906, 995, 35728, 35729, 912, 35731, 916, 917, 35734, 35735, 919, 921, 922, 35739, 924, 2219, 925, 923, 920, 926, 35746, 35747, 35748, 35749, 934, 2221, 936, 935, 938, 937, 939, 940, 933, 1000, 945, 946, 1610675, 948, 949, 950, 947, 35768, 35769, 35770, 35771, 35772, 35773, 35774, 35775, 41913, 41914, 41915, 959, 957, 958, 961, 965, 963, 962, 966, 970, 964, 967, 974, 975, 976, 977, 978, 35795, 35796, 35797, 982, 35799, 35800, 983, 985, 35803, 984, 35805, 986, 987, 988, 35809, 989, 990, 993, 997, 998, 991, 992, 1001, 35818, 1002, 1003, 1004, 1006, 1005, 1007, 1008, 1010, 1011, 1012, 1009, 1014, 41975, 41976, 1013, 41982, 41983, 35841, 1026, 1027, 35844, 35845, 35846, 35847, 35848, 41991, 35850, 35851, 35852, 41992, 35854, 1039, 1038, 41993, 1040, 1043, 1044, 1045, 1046, 35863, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 35881, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 2249, 2250, 2251, 1086, 1087, 1089, 1090, 1091, 42052, 42053, 42054, 1092, 1093, 2252, 42058, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 42066, 42067, 1107, 1106, 2254, 1110, 1108, 42073, 42074, 1109, 42076, 42077, 42078, 42079, 1116, 42081, 42082, 1122, 1124, 1123, 1121, 35943, 1125, 1127, 1130, 1131, 35950, 1140, 1141, 1041, 1143, 1042, 1150, 1151, 1152, 3204, 1156, 1158, 1159, 1157, 1162, 1163, 1164, 1165, 1166, 1167, 1047, 1173, 38042, 38043, 3246, 3247, 3248, 3249, 3252, 3253, 3254, 3255, 3257, 109336, 109337, 109343, 109344, 109345, 109346, 109347, 40968, 40969, 40970, 40971, 36167, 36170, 36172, 36178, 36179, 36180, 36181, 36182, 36183, 36184, 36185, 36186, 36187, 36188, 36189, 36190, 36191, 36192, 36193, 36194, 1088, 36195, 825, 109364, 109365, 36200, 36201, 36202, 109367, 1032, 36210, 36211, 36212, 109368, 36215, 109369, 36218, 36219, 36225, 36226, 36227, 36228, 36229, 36230, 109372, 1033, 109371, 1096, 36235, 36236, 109373, 1097, 109374, 1098, 36252, 36253, 36254, 36255, 36256, 36257, 1034, 2256, 1035, 2257, 146896, 1036, 1111, 708, 1037, 1117, 710, 146937, 1494580, 1494584, 1494585, 1494587, 1494590, 1494591, 1494595, 1494596, 1494599, 42570, 1494604, 1494605, 1494606, 1494607, 1494608, 42582, 42583, 42584, 42585, 42586, 42587, 42588, 42594, 42595, 42596, 42597, 42598, 1594983, 42600, 1594982, 1594984, 1594985, 36965, 1607298, 1607299, 32419, 36976, 36977, 36978, 36979, 36980, 36981, 36982, 36983, 36984, 2105, 36985, 36986, 1494762, 36987, 1494763, 1494764, 1494769, 1494770, 41875, 36991, 37055, 1486991, 41890, 778, 41891, 109362, 41892, 780, 782, 783, 784, 1603442, 1603443, 40820, 40819, 788, 1918, 1919, 1920, 790, 158, 972, 791, 1593601, 792, 793, 41906, 794, 795, 973, 796, 797, 798, 799, 37028, 800, 37029, 801, 802, 37030, 37031, 109363, 804, 37032, 37033, 37034, 37035, 808, 37036, 809, 37037, 37038, 37039, 37040, 37041}
nx.diameter(G) # NetworkXError: Found infinite path length because the graph is not connected
# Refer graph statistics for diameter details
--------------------------------------------------------------------------- NetworkXError Traceback (most recent call last) <ipython-input-12-81df42be3d5a> in <cell line: 1>() ----> 1 nx.diameter(G) # NetworkXError: Found infinite path length because the graph is not connected 2 3 # Refer graph statistics for diameter details /usr/local/lib/python3.10/dist-packages/networkx/utils/decorators.py in argmap_diameter_27(G, e, usebounds, weight, backend, **backend_kwargs) 1 import bz2 2 import collections ----> 3 import gzip 4 import inspect 5 import itertools /usr/local/lib/python3.10/dist-packages/networkx/utils/backends.py in __call__(self, backend, *args, **kwargs) 631 if not backends: 632 # Fast path if no backends are installed --> 633 return self.orig_func(*args, **kwargs) 634 635 # Use `backend_name` in this function instead of `backend` /usr/local/lib/python3.10/dist-packages/networkx/algorithms/distance_measures.py in diameter(G, e, usebounds, weight) 379 return _extrema_bounding(G, compute="diameter", weight=weight) 380 if e is None: --> 381 e = eccentricity(G, weight=weight) 382 return max(e.values()) 383 /usr/local/lib/python3.10/dist-packages/networkx/utils/decorators.py in argmap_eccentricity_31(G, v, sp, weight, backend, **backend_kwargs) 1 import bz2 2 import collections ----> 3 import gzip 4 import inspect 5 import itertools /usr/local/lib/python3.10/dist-packages/networkx/utils/backends.py in __call__(self, backend, *args, **kwargs) 631 if not backends: 632 # Fast path if no backends are installed --> 633 return self.orig_func(*args, **kwargs) 634 635 # Use `backend_name` in this function instead of `backend` /usr/local/lib/python3.10/dist-packages/networkx/algorithms/distance_measures.py in eccentricity(G, v, sp, weight) 318 else: 319 msg = "Found infinite path length because the graph is not" " connected" --> 320 raise nx.NetworkXError(msg) 321 322 e[n] = max(length.values()) NetworkXError: Found infinite path length because the graph is not connected
# Density
density = nx.density(graph)
print(f"Density of the graph: {density}")
# Max and Min degree
degrees = dict(graph.degree())
max_degree = max(degrees.values())
min_degree = min(degrees.values())
# Average degree
avg_degree = (2 * num_edges) / num_nodes
print(f"Average degree: {avg_degree}")
# Number of connected components
connected_components = list(nx.connected_components(graph))
largest_component_size = max(len(c) for c in connected_components) # Find the size of the largest connected component
print(f"Size of the largest connected component: {largest_component_size}")
# Degree assortativity
assortativity = nx.degree_assortativity_coefficient(graph)
print(f"Degree assortativity coefficient: {assortativity}")
Density of the graph: 0.2857142857142857 Average degree: 1.7142857142857142 Size of the largest connected component: 7 Degree assortativity coefficient: -0.7142857142857144
print(nx.clustering(G))
Clustering_coeff=nx.clustering(G)
res = {key : round(Clustering_coeff[key], 3) for key in Clustering_coeff}
df=pd.DataFrame(res.items(), columns=["Node", "Clustering_coeff"])
print(df.sort_values('Clustering_coeff',ascending=False))
df.to_csv('Clustering_coeff.csv')
{0: 0, 1: 0, 2: 0, 469: 0, 6: 0, 385: 0, 3: 0, 380: 0, 37415: 0, 5: 0.3333333333333333, 384: 0, 386: 0, 4: 0.16666666666666666, 419: 0, 422: 0, 98: 0.16666666666666666, 420: 0, 35698: 0, 183: 0, 423: 0, 470: 0, 35729: 0, 35709: 0, 7: 0, 8: 0, 9: 0.3333333333333333, 79: 0, 33: 0, 10: 0.3333333333333333, 84: 0.16666666666666666, 78: 0, 119: 0, 32: 0, 34: 0, 11: 0.3333333333333333, 110: 0.3333333333333333, 83: 0, 85: 0, 12: 0.16666666666666666, 111: 0.3333333333333333, 112: 0.16666666666666666, 13: 0.16666666666666666, 95: 0.3333333333333333, 108: 0.16666666666666666, 14: 0, 94: 0, 109: 0.3333333333333333, 113: 0.3333333333333333, 123: 0, 96: 0, 15: 0, 16: 0, 77: 0, 93: 0, 17: 0.16666666666666666, 18: 0.3333333333333333, 3254: 0.16666666666666666, 19: 0, 3255: 0, 36971: 0, 20: 0, 23: 0, 21: 0, 22: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 0, 29: 0, 30: 0, 31: 0, 3247: 0, 3253: 0, 35943: 0, 3246: 0, 3248: 0, 3249: 0, 3204: 0, 35950: 0, 2203: 0, 3252: 0, 3257: 0, 2146: 0, 2204: 0, 35: 0, 36: 0, 50: 0, 1199: 0.3333333333333333, 37: 0.3333333333333333, 35885: 0, 1645159: 0, 49: 0, 185: 0, 1198: 0.16666666666666666, 1205: 1.0, 38: 0.3333333333333333, 1641586: 0.3333333333333333, 35884: 0, 1645157: 0, 1645156: 0, 1648644: 0, 39: 0, 1633418: 0, 40: 0, 1641587: 0, 41: 0, 1641577: 0, 1641576: 0, 1641606: 0, 42: 0.3333333333333333, 1641355: 0, 1641363: 0, 43: 0.3333333333333333, 1639779: 0.3333333333333333, 1628954: 0, 1639780: 0, 44: 0, 45: 0, 1542024: 0, 46: 0.16666666666666666, 1154: 0, 1538392: 0, 1542023: 0, 1639781: 0, 47: 0.3333333333333333, 27108: 0, 27325: 0.16666666666666666, 1153: 0, 1155: 0, 1538362: 0, 1538390: 0, 1538391: 0, 48: 0, 27107: 0, 27250: 0, 27323: 0, 27335: 0, 27343: 0, 184: 0, 27342: 0, 35887: 0, 39411: 0, 35886: 0, 52: 0.3333333333333333, 53: 0.16666666666666666, 54: 0.3333333333333333, 4152: 0, 223: 0, 225: 0, 4120: 0, 4148: 0, 4153: 0, 4156: 0, 224: 0, 3937: 0, 4113: 0, 4114: 0, 4154: 0, 55: 0, 56: 0, 57: 0, 1068: 0.1, 1099: 0, 76: 0, 1069: 0.3333333333333333, 58: 0, 1071: 0.16666666666666666, 1072: 0, 1096: 0, 1116: 0.16666666666666666, 36235: 0, 74: 0, 1075: 0, 59: 0, 1089: 0.16666666666666666, 32419: 0, 1070: 0, 1098: 0.3333333333333333, 1110: 0.3333333333333333, 60: 0, 61: 0, 62: 0, 171: 0.3333333333333333, 172: 0.3333333333333333, 63: 0, 64: 0, 339: 0, 65: 0, 2220: 0, 338: 0.16666666666666666, 341: 0, 36187: 0, 66: 0, 2155: 0, 2157: 0, 2219: 0, 2221: 0, 67: 0, 68: 0.16666666666666666, 2254: 0, 2156: 0, 2158: 0, 2161: 0, 69: 0, 70: 0.16666666666666666, 2251: 0.3333333333333333, 2252: 0, 71: 0, 1052: 0, 72: 0, 1049: 0, 1050: 0, 2256: 0, 2258: 0, 73: 0, 1048: 0, 75: 0, 1073: 0, 1076: 0, 80: 0, 455: 0, 81: 0, 105: 0, 454: 0, 116: 0, 118: 0, 342: 0.16666666666666666, 82: 0, 104: 0.16666666666666666, 107: 0.3333333333333333, 124: 0.3333333333333333, 114: 0, 86: 0.16666666666666666, 87: 0.3333333333333333, 88: 0.3333333333333333, 128: 0.16666666666666666, 315: 0, 97: 0.16666666666666666, 134: 0.3333333333333333, 89: 0, 146: 0, 129: 0.16666666666666666, 452: 0, 135: 0.3333333333333333, 316: 0.3333333333333333, 90: 0, 91: 0, 92: 0, 133: 0, 132: 0, 139: 0, 410: 0.16666666666666666, 471: 0, 35881: 0, 35728: 0, 99: 0.16666666666666666, 100: 0, 101: 0.16666666666666666, 136: 0.2, 6790: 0.2, 103: 0, 137: 0.16666666666666666, 6760: 0, 102: 0, 6771: 0.16666666666666666, 421: 0.3333333333333333, 6792: 0.3333333333333333, 6805: 0.16666666666666666, 6791: 0, 6802: 1.0, 6713: 0, 6748: 0, 6764: 0, 6757: 0, 6733: 0, 6738: 0.06666666666666667, 6772: 1.0, 6722: 0, 6734: 0, 6736: 0, 6737: 0, 6765: 0, 6711: 0, 6714: 0, 6717: 0, 6747: 0, 6759: 0, 106: 0.16666666666666666, 151: 0, 150: 0, 152: 0, 115: 0.16666666666666666, 117: 0.16666666666666666, 120: 0.16666666666666666, 169: 0.3333333333333333, 122: 0, 121: 0.3333333333333333, 170: 0, 36184: 0, 453: 0, 340: 0.3333333333333333, 36185: 0, 125: 0.2, 126: 0.3333333333333333, 127: 0.16666666666666666, 176: 0.3333333333333333, 355: 0, 383: 0, 354: 0, 353: 0, 443: 0, 381: 0, 153: 0.16666666666666666, 155: 0.3333333333333333, 37498: 0, 356: 0, 358: 0, 442: 0, 130: 0.16666666666666666, 154: 0.16666666666666666, 444: 0, 145: 0, 41762: 0, 131: 0, 359: 0, 36966: 0, 41761: 0, 138: 0, 387: 0, 6770: 0.3333333333333333, 6793: 0.1, 6797: 0, 6763: 0, 6766: 0, 388: 0, 140: 0.3333333333333333, 141: 0.3333333333333333, 142: 0.3333333333333333, 391: 0, 389: 0, 392: 0.3333333333333333, 390: 0, 143: 0, 144: 0.16666666666666666, 177: 0, 178: 0.3333333333333333, 186: 0.3333333333333333, 187: 0, 41763: 0, 147: 0, 148: 0, 149: 0, 166: 0, 167: 0, 168: 0, 317: 0, 162: 0, 36963: 0, 303: 0, 318: 0, 357: 0, 156: 0.3333333333333333, 157: 0.3333333333333333, 158: 0.3333333333333333, 1057: 0.3333333333333333, 175: 0.3333333333333333, 1093: 0.3333333333333333, 159: 0, 1058: 0, 173: 0, 160: 0, 1056: 0, 161: 0, 36965: 0, 1055: 0, 36964: 0, 163: 0, 164: 0, 165: 0, 174: 0, 314: 0, 179: 0.16666666666666666, 180: 0, 181: 0, 425: 0.3333333333333333, 42066: 0.16666666666666666, 379: 0, 434: 0, 182: 0, 426: 0.16666666666666666, 35695: 0.16666666666666666, 424: 0.3333333333333333, 42067: 0, 42074: 0, 435: 0, 460: 0.16666666666666666, 42076: 0, 35699: 0, 35696: 0, 35703: 1.0, 35746: 0.3333333333333333, 35890: 0, 35891: 0, 35892: 0, 35895: 0, 312: 0, 41764: 0, 188: 0, 189: 0, 190: 0, 369: 0.3333333333333333, 191: 0, 193: 0, 351: 0, 367: 0.3333333333333333, 368: 1.0, 441: 0, 360: 0, 440: 0, 192: 0, 195: 0, 461: 0, 350: 0, 371: 0, 194: 0, 201: 0, 203: 0, 375: 0.3333333333333333, 202: 0, 352: 0, 462: 0, 373: 0, 374: 0.3333333333333333, 42079: 0.3333333333333333, 196: 0, 197: 0, 198: 0, 7178: 0, 200: 0, 23401: 0, 199: 0, 15697: 0, 7176: 0, 7179: 0, 503: 0, 24015: 0, 7332: 0, 15686: 0, 205: 0.16666666666666666, 372: 0.3333333333333333, 204: 0.16666666666666666, 206: 0, 213: 0.16666666666666666, 209: 0.3333333333333333, 207: 0.3333333333333333, 433: 0, 211: 0, 212: 0, 208: 0.3333333333333333, 344: 0.3333333333333333, 432: 0.16666666666666666, 260: 0.16666666666666666, 343: 0, 210: 0, 235: 0, 227: 0, 230: 0, 236: 0, 41752: 0, 370: 0, 41755: 0, 229: 0.3333333333333333, 261: 0, 226: 0, 234: 0, 214: 0.3333333333333333, 215: 0.3333333333333333, 216: 0.3333333333333333, 309: 0, 308: 0, 310: 0, 311: 0, 313: 0, 307: 0, 36178: 0, 217: 0, 218: 0, 222: 0.1, 7925: 0, 219: 0, 7923: 0, 221: 0, 4895: 0, 4899: 0.3333333333333333, 7926: 0.16666666666666666, 220: 0, 7922: 0, 7924: 0, 7931: 0, 7921: 0, 7901: 0, 7918: 0, 7932: 0, 7937: 0, 7881: 0, 7888: 0, 7882: 0, 7887: 0, 4896: 0, 4898: 0, 7927: 0, 43222: 0, 4109: 0, 4110: 0, 3940: 0, 3938: 0, 4100: 0, 4096: 0, 4099: 0, 4117: 0, 4149: 0, 228: 0.3333333333333333, 251: 0, 255: 0.3333333333333333, 273: 0, 233: 0, 254: 0, 259: 0.16666666666666666, 42078: 0.3333333333333333, 231: 0, 232: 0, 289: 0, 245: 0, 276: 0, 288: 0, 250: 0.3333333333333333, 244: 0, 246: 0, 247: 0.3333333333333333, 274: 0, 275: 0, 277: 0, 278: 0, 41753: 0, 41754: 0, 243: 0.3333333333333333, 248: 0.3333333333333333, 237: 0.3333333333333333, 238: 0.16666666666666666, 239: 0.1, 3930: 0, 241: 0, 3295: 0, 240: 0, 3271: 0, 3889: 0, 3931: 0, 3292: 0, 3296: 0, 4080: 0, 3276: 0, 3272: 0, 3888: 0, 3890: 0, 3275: 0, 3277: 0, 3291: 0, 242: 0, 36218: 0, 253: 0, 249: 0, 36219: 0, 252: 0, 1159: 0, 1158: 0, 256: 0, 257: 0, 258: 0, 272: 0, 35850: 0.16666666666666666, 42587: 0, 271: 0.3333333333333333, 35851: 0.16666666666666666, 36974: 0.3333333333333333, 42588: 0, 42586: 0, 36975: 0, 42077: 0, 262: 0, 263: 0, 264: 0, 549: 0, 550: 0, 265: 0, 267: 0, 548: 0, 279: 0, 36211: 0, 525: 0, 36210: 0, 266: 0, 268: 0, 1918: 0, 269: 0, 290: 0.16666666666666666, 297: 0.3333333333333333, 1919: 0, 36987: 0, 270: 0.3333333333333333, 42585: 0, 291: 0.3333333333333333, 327: 0.3333333333333333, 1920: 0, 296: 0.3333333333333333, 42583: 0.16666666666666666, 301: 0.3333333333333333, 42582: 0, 280: 0, 281: 0, 282: 0.16666666666666666, 35769: 0, 285: 0.3333333333333333, 42598: 0, 283: 0.3333333333333333, 286: 0.16666666666666666, 35773: 0, 35768: 0, 35852: 0, 284: 0.16666666666666666, 35845: 0.3333333333333333, 35846: 0.3333333333333333, 35841: 0, 35854: 0, 42600: 0, 287: 0, 35772: 0, 35775: 0, 35847: 0, 35844: 0, 35771: 0, 35774: 0, 42570: 0, 35848: 0, 36212: 0, 36215: 0, 292: 0.3333333333333333, 293: 0.16666666666666666, 480: 0.3333333333333333, 294: 0.16666666666666666, 35805: 0, 479: 0, 295: 0, 35795: 0.3333333333333333, 35796: 0.16666666666666666, 35797: 0, 35799: 0, 35770: 0, 42584: 0, 298: 0.3333333333333333, 299: 0.3333333333333333, 300: 0.3333333333333333, 35863: 0, 302: 0, 304: 0, 305: 0, 1092: 0, 306: 0, 1103: 0, 1156: 0, 1090: 0, 1100: 0, 1143: 0, 1101: 0, 1124: 0, 1157: 0, 1165: 0, 319: 0, 320: 0, 321: 0, 322: 0, 323: 0, 326: 0.16666666666666666, 3481: 0, 324: 0, 325: 0.1, 3479: 0, 3430: 0, 3432: 0, 4173: 0, 4175: 0.16666666666666666, 3434: 0, 3431: 0, 3475: 0, 3480: 0, 4181: 0, 3482: 0, 3369: 0, 3429: 0, 3415: 0, 3427: 0, 3416: 0, 3474: 0, 3476: 0, 3424: 0, 4178: 0, 4174: 0, 4179: 0, 4182: 0, 4132: 0, 36979: 0, 36980: 0, 328: 0.3333333333333333, 329: 0.3333333333333333, 330: 0.3333333333333333, 40094: 0, 11435: 0, 12041: 0, 11433: 0, 11434: 0, 12022: 0, 12058: 0, 331: 0.3333333333333333, 332: 0.3333333333333333, 333: 0.3333333333333333, 35734: 0, 404: 0, 36967: 0, 35731: 0, 35735: 0, 405: 0.3333333333333333, 334: 0, 335: 0, 337: 0, 336: 0, 12138: 0, 12176: 0, 12175: 0, 12202: 0, 12032: 0, 12033: 0, 36186: 0, 2202: 0, 42082: 0, 42081: 0, 42594: 0, 42595: 0, 345: 0.3333333333333333, 346: 0.1, 347: 0.16666666666666666, 3294: 0.3333333333333333, 349: 0.16666666666666666, 3290: 0, 3338: 0.3333333333333333, 348: 0, 3285: 0, 3339: 0, 3293: 0, 3319: 0, 3284: 0, 3286: 0, 3314: 0, 3340: 0, 3347: 0, 36261: 0, 382: 0.3333333333333333, 361: 0, 362: 0, 363: 0, 41760: 0, 364: 0, 41759: 0, 365: 0, 366: 0, 41758: 0, 41756: 0, 41757: 0, 42597: 0, 376: 0.3333333333333333, 377: 0.16666666666666666, 378: 0.16666666666666666, 16472: 0, 12226: 0, 12227: 0, 12230: 0, 12247: 0, 1176: 0, 37523: 0, 12225: 0, 16399: 0, 12228: 0, 12229: 0, 12231: 0, 12248: 0, 37522: 0, 393: 1.0, 468: 0, 394: 0, 395: 0, 396: 0, 7162: 0.16666666666666666, 399: 0, 42094: 0, 397: 0, 7163: 0.16666666666666666, 7184: 0, 7186: 1.0, 398: 0, 457: 0, 42329: 0, 3263: 0, 3261: 0, 3264: 0, 21184: 0, 3262: 0, 20839: 0, 456: 0, 459: 0.3333333333333333, 20849: 0, 41945: 0, 400: 0, 401: 0, 403: 0, 592: 0, 402: 0, 41613: 0, 450: 0, 591: 0, 2661: 0, 445: 0, 2625: 0, 42211: 0, 446: 0, 40748: 0, 449: 0, 451: 0, 411: 0.3333333333333333, 472: 0, 36193: 0, 406: 0, 407: 0, 408: 0, 6024: 0, 409: 0, 6025: 0, 36209: 0, 6300: 0, 6048: 0, 5636: 0, 6301: 0, 6049: 0, 36224: 0, 6302: 0, 5637: 0, 5638: 0, 473: 0, 35717: 0, 412: 0, 413: 0, 414: 0.3333333333333333, 683: 0, 418: 0, 755: 0, 7795: 0, 415: 0.3333333333333333, 682: 0.3333333333333333, 677: 0, 699: 0, 417: 0, 7794: 0, 756: 0, 758: 0, 7793: 0, 7792: 0, 416: 0, 681: 0, 1025: 0, 1024: 0, 7757: 0, 1023: 0.3333333333333333, 7756: 0.16666666666666666, 7755: 0, 7787: 0, 35405: 0, 35710: 0, 6769: 0, 6794: 0, 6798: 0, 427: 0, 35747: 0, 42052: 0, 35748: 0, 35749: 0, 42058: 0, 42053: 0, 42054: 0, 428: 0, 429: 0.16666666666666666, 430: 0, 7190: 0, 40005: 0, 431: 0.16666666666666666, 12629: 0.3333333333333333, 40022: 0, 5927: 0, 5970: 0, 611: 0, 7156: 0, 40006: 0, 5925: 0, 6855: 0, 40015: 0, 40017: 0, 40023: 0, 5928: 0, 5929: 0, 5971: 0, 7130: 0, 5926: 0, 436: 0, 437: 0, 439: 0.3333333333333333, 23898: 0, 438: 0.16666666666666666, 33468: 0, 20655: 0.3333333333333333, 23896: 0.16666666666666666, 23897: 0, 40853: 0, 15713: 0, 33467: 0, 33469: 0, 39690: 0, 39962: 0, 15712: 0, 15714: 0, 40848: 0, 39978: 0, 447: 0, 2648: 0, 40749: 0, 42208: 0, 448: 0, 2647: 0, 2649: 0, 2646: 0, 2934: 0, 2938: 0, 2652: 0, 458: 0.1, 21970: 0, 20811: 0, 20812: 0, 21121: 0.3333333333333333, 20869: 0, 21969: 0, 20848: 0, 21122: 0, 41944: 0, 42092: 0, 20813: 0, 20772: 0, 20803: 0, 42073: 0, 42596: 0, 463: 0, 464: 0, 467: 0, 20571: 0, 465: 0.16666666666666666, 5314: 0, 5315: 0, 466: 0.3333333333333333, 20718: 0, 25505: 0, 20572: 0, 20576: 0, 20725: 0, 40105: 0, 41916: 0.3333333333333333, 5312: 0, 42134: 0, 5313: 0, 41917: 0, 40104: 0, 40110: 0, 20554: 0, 20716: 0, 20723: 0, 20534: 0, 20556: 0, 35739: 0, 474: 0, 475: 0, 476: 0, 1594983: 0, 478: 0, 477: 0, 36977: 0, 36986: 0, 1594984: 0, 1610675: 0, 36978: 0, 1594985: 0, 35803: 0, 36976: 0, 35800: 0, 35809: 0, 35818: 0, 481: 0, 482: 0, 507: 0, 483: 0.3333333333333333, 506: 0, 21548: 0, 484: 0.16666666666666666, 4074: 0.16666666666666666, 5805: 0, 485: 0, 4040: 0, 4041: 0, 5937: 0, 486: 0, 4039: 0, 487: 0, 5809: 0, 488: 0, 489: 0, 5807: 0, 5943: 0, 490: 0, 5808: 0, 491: 0, 5951: 0, 492: 0, 4077: 0, 5948: 0, 493: 0, 4076: 0, 4075: 0, 5954: 0, 494: 0, 7131: 0, 5813: 0, 495: 0, 7133: 0, 7132: 0, 7152: 0, 496: 0, 7154: 0, 497: 0, 7145: 0, 7153: 0, 7161: 0, 7206: 0, 498: 0, 7142: 0, 7146: 0, 7207: 0, 499: 0, 7141: 0, 500: 0, 501: 0.2, 502: 0, 7164: 0.5, 7165: 0.3333333333333333, 23431: 0.3333333333333333, 7144: 0, 7166: 1.0, 7180: 0, 504: 0.3333333333333333, 505: 0.16666666666666666, 4044: 0.3333333333333333, 24013: 0, 24012: 0, 21549: 0, 24014: 0, 509: 0, 510: 0, 511: 0, 6685: 0, 513: 0, 6681: 0, 512: 0, 6684: 0, 6696: 0, 6679: 0, 6699: 0, 6616: 0, 6621: 0, 6682: 0, 6604: 0, 6683: 0, 6700: 0, 6963: 0, 6953: 0, 6605: 0, 6606: 0, 6620: 0, 6893: 0, 514: 0.16666666666666666, 515: 0.3333333333333333, 516: 0.2, 1119: 0, 5892: 0, 1120: 0, 5883: 0, 5884: 0.16666666666666666, 5894: 0.16666666666666666, 1118: 0, 5890: 0, 5896: 0, 5902: 0, 5874: 0, 5882: 0, 5893: 0, 5862: 0, 5854: 0, 5864: 0, 517: 0, 518: 0.16666666666666666, 519: 0.3333333333333333, 8146: 0, 520: 0.3333333333333333, 8154: 0, 8155: 0.16666666666666666, 8145: 0.16666666666666666, 8153: 0.2, 8137: 0, 8147: 0, 8156: 0, 8152: 0, 8157: 0, 8124: 0, 8148: 0, 8151: 0, 521: 0, 522: 0, 36982: 0, 36992: 0, 523: 0, 36983: 0, 36991: 0, 36993: 0, 524: 0, 526: 0, 36201: 0, 1166: 0, 36200: 0, 36202: 0, 1167: 0, 527: 0, 528: 0, 529: 0, 532: 0, 531: 0, 534: 0, 5432: 0, 530: 0, 5418: 0, 533: 0, 5444: 0, 5449: 0, 5421: 0, 5422: 0, 535: 0, 5433: 0, 5438: 0, 5423: 0, 5368: 0, 5417: 0, 5424: 0, 5367: 0, 5391: 0, 5420: 0, 5450: 0, 5445: 0, 5448: 0, 5443: 0, 5437: 0, 5442: 0, 7984: 0, 5431: 0, 5436: 0, 5447: 0, 536: 0, 537: 0, 541: 0, 542: 0, 538: 0.16666666666666666, 36981: 0, 540: 0, 543: 0, 539: 0, 36985: 0.3333333333333333, 1603443: 0.16666666666666666, 1603442: 0, 36984: 0, 1607299: 0, 1594982: 0, 1607298: 0, 1593601: 0, 544: 0, 545: 0, 546: 0, 4371: 0, 4373: 0, 547: 0, 4481: 0, 4372: 0, 4476: 0, 4487: 0, 4485: 0, 4480: 0, 4484: 0, 551: 0, 552: 0.3333333333333333, 553: 0, 559: 0.3333333333333333, 555: 0.3333333333333333, 556: 0.3333333333333333, 554: 0, 36197: 0, 558: 0.3333333333333333, 560: 0.16666666666666666, 557: 0, 1189: 0, 36196: 0, 36207: 0, 561: 0, 1187: 0, 1190: 0, 568: 0, 2023: 0, 2025: 0, 37003: 0, 2024: 0, 37015: 0, 37004: 0, 37005: 0, 573: 0, 562: 0.3333333333333333, 563: 0, 566: 0.3333333333333333, 567: 0.3333333333333333, 564: 0, 37017: 0, 565: 0.3333333333333333, 569: 0.3333333333333333, 37020: 0, 37016: 0, 37018: 0, 37019: 0, 579: 0, 577: 0, 578: 0, 570: 0, 571: 0, 572: 0, 589: 0, 574: 0, 580: 0, 575: 0, 587: 0, 576: 0, 588: 0, 590: 0, 581: 0.3333333333333333, 582: 0.3333333333333333, 583: 0, 22099: 0.3333333333333333, 586: 0.3333333333333333, 584: 0, 22098: 0, 21926: 0, 585: 0.13333333333333333, 944: 0.3333333333333333, 21927: 0, 22151: 0, 22105: 0, 22107: 0.6666666666666666, 22113: 0.6666666666666666, 31944: 0, 22108: 1.0, 17398: 0, 22106: 0, 2575: 0, 2653: 0, 2935: 0, 2660: 0, 2671: 0, 593: 0, 596: 0.3333333333333333, 594: 0.3333333333333333, 595: 0.3333333333333333, 36021: 0, 36020: 0, 36017: 0, 36022: 0, 597: 0.16666666666666666, 598: 0.3333333333333333, 599: 0.3333333333333333, 6851: 0, 7251: 0, 7066: 0, 6859: 0, 6007: 0, 7261: 0, 7250: 0, 7263: 0, 7068: 0, 7351: 0, 6858: 0, 7067: 0, 600: 0, 601: 0.16666666666666666, 603: 0, 663: 0, 3470: 0, 602: 0, 3484: 0.1, 3498: 0.16666666666666666, 664: 0, 665: 0, 3469: 0, 3473: 0, 3494: 0, 3452: 0, 3478: 0, 3497: 0, 3504: 0, 3453: 0, 3439: 0, 3451: 0, 604: 0, 605: 0, 606: 0, 676: 0, 36183: 0, 608: 0, 607: 0, 41826: 0, 675: 0.16666666666666666, 695: 0, 36179: 0, 36182: 0, 36190: 0, 673: 0, 41825: 0, 41892: 0, 672: 0.16666666666666666, 674: 0, 692: 0.16666666666666666, 609: 0, 610: 0, 614: 0.3333333333333333, 40021: 0, 6013: 0, 613: 0.3333333333333333, 40010: 0.3333333333333333, 40020: 0, 612: 0, 7188: 0, 6012: 0, 6014: 0, 40004: 0, 7189: 0, 7192: 0, 40009: 0, 615: 0, 616: 0, 617: 0, 1494580: 0, 624: 0, 661: 0, 618: 0, 1494584: 0, 623: 0, 662: 0, 109371: 0, 619: 0, 37031: 0, 620: 0, 36225: 0, 37030: 0, 37033: 0, 1494587: 0, 621: 0, 836: 0, 834: 0, 622: 0, 768: 0.1, 109373: 0.16666666666666666, 109372: 0.3333333333333333, 139985: 0, 625: 0, 626: 0, 648: 0, 12653: 0, 627: 0, 639: 0, 12794: 0, 12654: 0, 12655: 0, 628: 0, 629: 0, 630: 0, 12608: 0, 631: 0, 12604: 0, 12607: 0, 42214: 0, 632: 0, 1094: 0, 633: 0, 1095: 0, 634: 0, 635: 0, 12593: 0, 636: 0, 12597: 0, 12594: 0, 35973: 0, 637: 0, 12613: 0, 12596: 0, 35971: 0, 638: 0, 36326: 0, 12610: 0, 12612: 0, 12790: 0, 640: 0, 12793: 0, 12791: 0, 36327: 0, 641: 0.16666666666666666, 647: 0, 12792: 0, 12795: 0, 642: 0.3333333333333333, 644: 0.3333333333333333, 646: 0, 643: 0, 645: 0, 12796: 0, 33767: 0, 649: 0.3333333333333333, 650: 0.3333333333333333, 651: 0.3333333333333333, 654: 0.16666666666666666, 41880: 0, 41885: 0, 652: 0.3333333333333333, 653: 0.3333333333333333, 41888: 0, 41881: 0, 41882: 0, 41886: 0, 41887: 0, 2085: 0, 41879: 0, 2082: 0, 2084: 0, 655: 0, 656: 0, 657: 0, 660: 0, 9392: 0, 658: 0, 9387: 0, 9388: 0, 659: 0, 10016: 0, 9393: 0, 9395: 0, 9386: 0, 9366: 0, 10007: 0, 10015: 0, 9394: 0, 10006: 0, 10008: 0, 10017: 0, 109374: 0, 1494585: 0, 109369: 1.0, 109363: 0, 139986: 0, 3441: 0, 3465: 0, 3466: 0, 3437: 0, 3438: 0, 3450: 0, 3460: 0, 3380: 0, 3442: 0, 666: 0, 667: 0, 668: 0.16666666666666666, 800: 0.16666666666666666, 853: 0, 669: 0, 828: 0, 829: 0, 743: 0.3333333333333333, 744: 0.3333333333333333, 745: 0.2, 798: 0, 852: 0, 860: 0, 742: 0, 763: 0, 826: 0, 838: 0, 842: 0, 830: 0, 713: 0, 847: 0, 670: 0, 671: 0, 41890: 0, 109337: 0, 690: 0, 109344: 0, 41891: 0, 4414: 0, 109323: 0, 109336: 0, 691: 0, 40819: 0, 109345: 0, 109343: 0, 146896: 0, 694: 0, 693: 0, 738: 0, 36180: 0, 678: 0, 679: 0, 701: 0, 680: 0, 1998: 0, 700: 0, 752: 0, 2004: 0, 1999: 0, 1015: 0, 1079: 0, 3990: 0, 1016: 0, 748: 0, 684: 0, 685: 0, 686: 0.3333333333333333, 10312: 0, 689: 0, 10233: 0, 687: 0.16666666666666666, 10317: 0.3333333333333333, 10313: 0, 688: 0, 10300: 0, 10221: 0, 10234: 0, 10318: 0, 10315: 0, 10296: 0, 10298: 0, 10319: 0, 10607: 0, 10610: 0, 10299: 0, 10295: 0, 10297: 0, 10237: 0, 37029: 0, 709: 0, 40820: 0, 109346: 0, 109359: 0, 37028: 0, 739: 0, 720: 0, 740: 0, 737: 0, 696: 0.3333333333333333, 697: 0.3333333333333333, 698: 1.0, 712: 0.3333333333333333, 711: 0, 707: 0.3333333333333333, 708: 0.3333333333333333, 706: 0, 753: 0, 747: 0, 754: 0, 751: 0, 702: 0, 703: 0, 704: 0, 705: 0, 715: 0, 109347: 0, 741: 0, 710: 0, 716: 0, 146937: 0, 714: 0, 41823: 0.16666666666666666, 717: 0, 844: 0, 843: 0, 870: 0, 718: 0.3333333333333333, 719: 0, 721: 0.3333333333333333, 41824: 0, 722: 0, 723: 0.1, 724: 0, 19815: 0, 726: 0.16666666666666666, 19820: 0.6666666666666666, 19821: 0, 20397: 0.3333333333333333, 725: 0.3333333333333333, 19831: 0, 19832: 0, 19812: 0, 19813: 0, 19816: 0, 16916: 0, 16917: 0.3333333333333333, 19819: 1.0, 19822: 0, 19827: 0, 19828: 0, 16918: 0, 19834: 0, 19833: 0, 16914: 0, 727: 0.2, 728: 0.3333333333333333, 729: 0, 793: 0.16666666666666666, 794: 0.16666666666666666, 795: 0.3333333333333333, 746: 0, 730: 0, 731: 0, 929: 0.16666666666666666, 792: 0, 954: 0.16666666666666666, 797: 0, 796: 0, 801: 0, 732: 0, 953: 0, 733: 0, 734: 0, 735: 0, 963: 0, 736: 0, 897: 0, 964: 0, 904: 0, 909: 0, 901: 0, 906: 0, 908: 0, 892: 0.16666666666666666, 956: 0, 765: 0.3333333333333333, 766: 0.3333333333333333, 764: 0.3333333333333333, 799: 0, 802: 0, 749: 0, 7897: 0, 750: 0, 7878: 0, 7898: 0, 7902: 0, 4897: 0, 761: 0, 42389: 0, 7875: 0, 7879: 0, 7825: 0, 7826: 0, 7877: 0, 7823: 0, 760: 0, 7874: 0, 757: 0, 759: 0, 7763: 0, 7791: 0, 7762: 0, 7764: 0, 7790: 0, 7782: 0, 7872: 0, 7770: 0, 7781: 0, 7866: 0, 7871: 0, 7688: 0, 762: 0, 10154: 0, 10156: 0, 10148: 0, 10155: 0, 10149: 0, 37362: 0, 846: 0, 848: 0, 767: 0, 769: 0, 833: 0, 771: 0.3333333333333333, 784: 0.2, 109368: 0, 770: 0.16666666666666666, 782: 0, 835: 0, 772: 0, 791: 0, 109367: 0, 109365: 0, 781: 0, 783: 0, 37032: 0, 779: 0, 785: 0, 773: 0, 774: 0, 775: 0, 876: 0, 1494590: 0, 776: 0, 837: 0, 874: 0, 875: 0, 41659: 0, 1494591: 0, 777: 0, 839: 0, 872: 0, 778: 0, 780: 0, 786: 0, 832: 0, 827: 0, 790: 0, 819: 0, 109364: 0, 787: 0, 871: 0, 831: 0, 788: 0, 789: 0, 845: 0, 849: 0, 820: 0, 821: 0, 825: 0, 862: 0, 955: 0, 861: 0, 960: 0, 965: 0, 857: 0, 962: 0, 859: 0, 858: 0, 803: 0, 804: 0, 805: 0, 818: 0, 900: 0, 903: 0, 806: 0, 913: 0, 985: 0, 817: 0, 899: 0, 902: 0, 987: 0, 1005: 0, 807: 0, 810: 0, 912: 0, 914: 0, 986: 0, 808: 0, 811: 0, 809: 0, 812: 0.3333333333333333, 813: 0.3333333333333333, 2195: 0.16666666666666666, 917: 0.16666666666666666, 918: 0, 814: 0.3333333333333333, 2194: 0.16666666666666666, 41906: 0, 815: 0.3333333333333333, 36188: 0.3333333333333333, 816: 0, 883: 0.16666666666666666, 36194: 0.3333333333333333, 890: 0.3333333333333333, 889: 0.3333333333333333, 891: 0.3333333333333333, 898: 0, 36191: 0, 905: 0, 824: 0, 822: 0.3333333333333333, 869: 0, 823: 0.3333333333333333, 868: 0.3333333333333333, 867: 0, 109362: 0, 841: 0, 840: 0, 854: 0, 873: 0, 850: 0, 851: 0, 877: 0, 855: 0, 856: 0, 109361: 0, 43513: 0, 36226: 0, 37036: 0, 971: 0, 36227: 0, 863: 0, 864: 0, 866: 0, 25183: 0, 25187: 0, 865: 0, 24581: 0, 24584: 0, 25557: 0, 42668: 0, 25181: 0, 25261: 0, 25188: 0, 25189: 0, 24572: 0, 42662: 0, 24583: 0, 24875: 0, 24582: 0, 25182: 0, 24864: 0, 38152: 0, 24573: 0, 24574: 0, 25177: 0, 25577: 0, 42669: 0, 37038: 0, 1494595: 0, 37035: 0, 37037: 0, 1494596: 0, 972: 0, 37034: 0, 879: 0, 880: 0.16666666666666666, 882: 0, 2199: 0, 4961: 0, 881: 0.3333333333333333, 2191: 0.16666666666666666, 2192: 0.16666666666666666, 4968: 0, 2200: 0, 4900: 0, 4962: 0, 1137: 0, 4964: 0, 1018: 0.16666666666666666, 1019: 0.3333333333333333, 2193: 0, 4963: 0, 37237: 0, 884: 0, 885: 0.16666666666666666, 888: 0, 36189: 0, 886: 0.3333333333333333, 2196: 0.16666666666666666, 36195: 0, 887: 0, 2198: 0, 2197: 0, 41875: 0, 36192: 0, 893: 0.16666666666666666, 894: 0, 998: 0.3333333333333333, 961: 0, 895: 0, 997: 0.3333333333333333, 1001: 0.3333333333333333, 896: 0, 994: 0, 999: 0, 907: 0, 959: 0.16666666666666666, 36181: 0, 958: 0.16666666666666666, 957: 0.3333333333333333, 978: 0, 981: 0, 988: 0, 1008: 0, 1006: 0, 910: 0, 911: 0, 35561: 0, 35570: 0, 35568: 0, 35579: 0, 35560: 0, 35562: 0, 35571: 0, 35580: 0, 35569: 0, 35577: 0, 35578: 0, 916: 0.3333333333333333, 925: 0.3333333333333333, 915: 0.3333333333333333, 984: 0, 926: 0.6666666666666666, 927: 0.3333333333333333, 928: 0.3333333333333333, 924: 0.16666666666666666, 41712: 0.16666666666666666, 2105: 0, 919: 0.3333333333333333, 920: 0.3333333333333333, 921: 0.3333333333333333, 1036: 0.3333333333333333, 1037: 0.16666666666666666, 983: 0.16666666666666666, 922: 0.3333333333333333, 977: 0, 36253: 0, 982: 0, 923: 0.3333333333333333, 1002: 0.3333333333333333, 41914: 0, 41913: 0.16666666666666666, 2229: 0, 41713: 0, 41647: 1.0, 41650: 0.16666666666666666, 930: 0, 931: 0, 932: 0, 934: 0.3333333333333333, 37052: 0, 933: 0, 1026: 0, 940: 0, 41649: 0, 935: 0.3333333333333333, 1014: 0.3333333333333333, 37050: 0, 37053: 0, 1027: 0, 945: 0, 939: 0, 41975: 0, 41646: 0, 41976: 0, 1043: 0, 936: 0.16666666666666666, 1038: 0.16666666666666666, 937: 0, 949: 0.16666666666666666, 1039: 0.3333333333333333, 938: 0, 950: 0, 1086: 0, 2250: 0, 2243: 0.3333333333333333, 2249: 0.16666666666666666, 41983: 0, 41982: 0, 941: 0.5, 942: 0.3333333333333333, 943: 0.3333333333333333, 21594: 0.3333333333333333, 21744: 0.2, 21553: 0, 21599: 0, 21595: 0, 21743: 0, 21931: 0, 21552: 0, 21556: 0, 21598: 0, 21924: 0, 17397: 0, 21907: 0, 42356: 0, 946: 0, 947: 0, 948: 0, 1040: 0, 37049: 0.3333333333333333, 37054: 0, 1041: 0, 37048: 0.3333333333333333, 37055: 1.0, 37051: 0, 37056: 0, 1494770: 0, 1032: 0, 1074: 0, 1088: 0, 38043: 0, 2244: 1.0, 41992: 0.3333333333333333, 951: 0, 952: 0, 23187: 0, 15690: 0, 23188: 0, 23421: 0, 41724: 0, 15589: 0, 15689: 0, 967: 0, 966: 0, 970: 0, 1013: 0, 1009: 0, 979: 0, 975: 0, 1011: 0, 1007: 0, 1012: 0, 969: 0, 996: 0, 1000: 0, 995: 0, 968: 0, 36228: 0, 37039: 0, 1034: 0, 973: 0, 37041: 0, 974: 0, 976: 0, 41715: 0, 1494605: 0, 1494608: 0, 36254: 0, 36256: 0, 41714: 0, 1494762: 0, 1494763: 0, 1494764: 0, 37047: 0, 1494604: 0, 1486991: 0, 1494769: 0, 36255: 0, 980: 0, 1004: 0, 1003: 0, 989: 0, 990: 0, 993: 0, 991: 0, 992: 0, 1035: 0, 36230: 0, 40968: 0, 40969: 0, 40970: 0, 40971: 0, 41915: 0, 1010: 0, 37043: 0, 37045: 0, 37044: 0, 37046: 0, 1494606: 0, 1494607: 0, 36229: 0, 37040: 0, 1494599: 0, 1131: 0.3333333333333333, 41993: 0.3333333333333333, 1017: 0, 1085: 0, 1084: 0, 1020: 0, 1083: 0, 1021: 0, 1022: 0.1, 2201: 0, 7745: 0, 7750: 0.2, 4894: 0, 4893: 0, 7744: 0, 7747: 0, 7751: 1.0, 1028: 0, 1029: 0, 1030: 0, 18538: 0, 1031: 0, 18558: 0, 18703: 0, 18537: 0, 18539: 0, 18557: 0, 18705: 0, 18551: 0, 18702: 0, 38105: 0, 18559: 0, 18536: 0, 18706: 0, 38102: 0, 1033: 0, 1127: 0, 1130: 1.0, 1141: 0, 1042: 0, 36252: 0, 36257: 0, 41711: 0, 1044: 0.16666666666666666, 1045: 0.3333333333333333, 1046: 0.3333333333333333, 1047: 0, 1051: 0, 2190: 0, 2181: 0, 2132: 0, 2177: 0, 2182: 0, 1077: 0.3333333333333333, 2248: 1.0, 41991: 0.16666666666666666, 1078: 0.3333333333333333, 1087: 0.16666666666666666, 2178: 0, 2257: 0, 1053: 0, 1054: 0.3333333333333333, 1107: 0, 1059: 0.3333333333333333, 1122: 0.3333333333333333, 1091: 0, 1105: 0, 1152: 0, 1121: 0, 1106: 0, 1123: 0, 1060: 0.3333333333333333, 1061: 0, 1062: 0.3333333333333333, 23184: 0.3333333333333333, 23185: 0.3333333333333333, 1067: 0, 41722: 0, 1063: 0, 23420: 0, 1066: 0, 1548998: 0, 41723: 0, 1064: 0, 24030: 0, 24053: 0, 1065: 0, 41677: 0, 24029: 0, 24052: 0, 24060: 0, 41676: 0, 1558615: 0, 1556132: 0, 1556996: 0, 1555107: 0, 1097: 0, 1109: 0.3333333333333333, 1117: 0, 37075: 0, 36236: 0, 37074: 0, 1151: 0, 36172: 0, 1108: 0.3333333333333333, 38042: 0, 1080: 0, 1081: 0, 2002: 0, 1082: 0, 2001: 0, 7809: 0, 2003: 0, 1132: 0, 7799: 0, 2000: 0, 7810: 0, 7821: 0, 1133: 0, 7780: 0, 7800: 0, 1136: 0, 4969: 0, 1140: 0, 2246: 0, 1104: 0, 1162: 0, 1173: 0, 1111: 0, 1125: 0.16666666666666666, 1102: 0, 1163: 0, 1164: 0, 1150: 0, 36167: 0, 36170: 0, 1112: 0, 1113: 0, 1115: 0, 25442: 0, 1114: 0, 37064: 0, 37079: 0}
Node Clustering_coeff
270 6802 1.0
1635 19819 1.0
1283 22108 1.0
795 393 1.0
400 35703 1.0
... ... ...
861 418 0.0
860 683 0.0
858 413 0.0
857 412 0.0
2247 37079 0.0
[2248 rows x 2 columns]
#Degree plot for undirected and unweighted graph
degrees = [G.degree(n) for n in G.nodes()]
plt.hist(degrees)
(array([638., 0., 260., 0., 836., 0., 484., 0., 26., 4.]), array([1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. , 5.5, 6. ]), <BarContainer object of 10 artists>)
deg_centrality=nx.degree_centrality(G)
res = {key : round(deg_centrality[key], 3) for key in deg_centrality}
df=pd.DataFrame(res.items(), columns=["Node", "Degree Centrality"])
print(df.sort_values('Degree Centrality',ascending=False))
df.to_csv('Degree_Centrality.csv')
Node Degree Centrality 1275 585 0.003 808 457 0.003 276 6738 0.003 2017 946 0.003 1334 604 0.002 ... ... ... 700 3427 0.000 699 3415 0.000 698 3429 0.000 697 3369 0.000 2247 37079 0.000 [2248 rows x 2 columns]
Closeness_centrality=nx.closeness_centrality(G)
res = {key : round(Closeness_centrality[key], 3) for key in Closeness_centrality}
df=pd.DataFrame(res.items(), columns=["Node", "Closeness Centrality"])
print(df.sort_values('Closeness Centrality',ascending=False))
df.to_csv('Closeness_Centrality.csv')
Node Closeness Centrality 164 76 0.023 211 1049 0.023 162 1068 0.023 161 57 0.023 160 56 0.023 .. ... ... 739 12032 0.001 721 12058 0.001 720 12022 0.001 678 320 0.000 677 319 0.000 [2248 rows x 2 columns]
Betweenness_centrality=nx.betweenness_centrality(G)
res = {key : round(Betweenness_centrality[key], 3) for key in Betweenness_centrality}
df=pd.DataFrame(res.items(), columns=["Node", "Betweenness Centrality"])
print(df.sort_values('Betweenness Centrality',ascending=False))
df.to_csv('Betweenness_Centrality.csv')
Node Betweenness Centrality 1966 41650 0.114 1975 41649 0.114 1995 2250 0.112 1985 41976 0.112 1997 2249 0.110 ... ... ... 985 40110 0.000 984 40104 0.000 983 41917 0.000 982 5313 0.000 2247 37079 0.000 [2248 rows x 2 columns]
Katz_centrality=nx.katz_centrality(G,alpha=0.05, beta=1.0, max_iter=1000, tol=1e-02, nstart=None, normalized=True, weight=None)
res = {key : round(Katz_centrality[key], 3) for key in Katz_centrality}
df=pd.DataFrame(res.items(), columns=["Node", "Katz Centrality"])
print(df.sort_values('Katz Centrality',ascending=False))
df.to_csv('Katz_Centrality.csv')
Node Katz Centrality 1275 585 0.025 2017 946 0.025 276 6738 0.025 808 457 0.025 162 1068 0.024 ... ... ... 787 37523 0.019 786 1176 0.019 1659 953 0.019 1660 733 0.019 2247 37079 0.019 [2248 rows x 2 columns]
nx.sigma(G)
--------------------------------------------------------------------------- KeyboardInterrupt Traceback (most recent call last) Cell In[21], line 1 ----> 1 nx.sigma(G) File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/utils/decorators.py:789, in argmap.__call__.<locals>.func(_argmap__wrapper, *args, **kwargs) 788 def func(*args, __wrapper=None, **kwargs): --> 789 return argmap._lazy_compile(__wrapper)(*args, **kwargs) File <class 'networkx.utils.decorators.argmap'> compilation 103:6, in argmap_sigma_97(G, niter, nrand, seed, backend, **backend_kwargs) 4 import inspect 5 import itertools ----> 6 import re 7 import warnings 8 from collections import defaultdict File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/utils/backends.py:633, in _dispatchable.__call__(self, backend, *args, **kwargs) 628 """Returns the result of the original function, or the backend function if 629 the backend is specified and that backend implements `func`.""" 631 if not backends: 632 # Fast path if no backends are installed --> 633 return self.orig_func(*args, **kwargs) 635 # Use `backend_name` in this function instead of `backend` 636 backend_name = backend File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/algorithms/smallworld.py:300, in sigma(G, niter, nrand, seed) 298 randMetrics = {"C": [], "L": []} 299 for i in range(nrand): --> 300 Gr = random_reference(G, niter=niter, seed=seed) 301 randMetrics["C"].append(nx.transitivity(Gr)) 302 randMetrics["L"].append(nx.average_shortest_path_length(Gr)) File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/utils/decorators.py:789, in argmap.__call__.<locals>.func(_argmap__wrapper, *args, **kwargs) 788 def func(*args, __wrapper=None, **kwargs): --> 789 return argmap._lazy_compile(__wrapper)(*args, **kwargs) File <class 'networkx.utils.decorators.argmap'> compilation 110:6, in argmap_random_reference_104(G, niter, connectivity, seed, backend, **backend_kwargs) 4 import inspect 5 import itertools ----> 6 import re 7 import warnings 8 from collections import defaultdict File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/utils/backends.py:633, in _dispatchable.__call__(self, backend, *args, **kwargs) 628 """Returns the result of the original function, or the backend function if 629 the backend is specified and that backend implements `func`.""" 631 if not backends: 632 # Fast path if no backends are installed --> 633 return self.orig_func(*args, **kwargs) 635 # Use `backend_name` in this function instead of `backend` 636 backend_name = backend File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/algorithms/smallworld.py:108, in random_reference(G, niter, connectivity, seed) 105 G.remove_edge(c, d) 107 # Check if the graph is still connected --> 108 if connectivity and local_conn(G, a, b) == 0: 109 # Not connected, revert the swap 110 G.remove_edge(a, d) 111 G.remove_edge(c, b) File <class 'networkx.utils.decorators.argmap'> compilation 118:3, in argmap_local_edge_connectivity_115(G, s, t, flow_func, auxiliary, residual, cutoff, backend, **backend_kwargs) 1 import bz2 2 import collections ----> 3 import gzip 4 import inspect 5 import itertools File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/utils/backends.py:633, in _dispatchable.__call__(self, backend, *args, **kwargs) 628 """Returns the result of the original function, or the backend function if 629 the backend is specified and that backend implements `func`.""" 631 if not backends: 632 # Fast path if no backends are installed --> 633 return self.orig_func(*args, **kwargs) 635 # Use `backend_name` in this function instead of `backend` 636 backend_name = backend File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/algorithms/connectivity/connectivity.py:648, in local_edge_connectivity(G, s, t, flow_func, auxiliary, residual, cutoff) 645 elif flow_func is boykov_kolmogorov: 646 kwargs["cutoff"] = cutoff --> 648 return nx.maximum_flow_value(H, s, t, **kwargs) File <class 'networkx.utils.decorators.argmap'> compilation 126:3, in argmap_maximum_flow_value_123(flowG, _s, _t, capacity, flow_func, backend, **kwargs) 1 import bz2 2 import collections ----> 3 import gzip 4 import inspect 5 import itertools File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/utils/backends.py:633, in _dispatchable.__call__(self, backend, *args, **kwargs) 628 """Returns the result of the original function, or the backend function if 629 the backend is specified and that backend implements `func`.""" 631 if not backends: 632 # Fast path if no backends are installed --> 633 return self.orig_func(*args, **kwargs) 635 # Use `backend_name` in this function instead of `backend` 636 backend_name = backend File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/algorithms/flow/maxflow.py:297, in maximum_flow_value(flowG, _s, _t, capacity, flow_func, **kwargs) 294 if not callable(flow_func): 295 raise nx.NetworkXError("flow_func has to be callable.") --> 297 R = flow_func(flowG, _s, _t, capacity=capacity, value_only=True, **kwargs) 299 return R.graph["flow_value"] File <class 'networkx.utils.decorators.argmap'> compilation 130:3, in argmap_edmonds_karp_127(G, s, t, capacity, residual, value_only, cutoff, backend, **backend_kwargs) 1 import bz2 2 import collections ----> 3 import gzip 4 import inspect 5 import itertools File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/utils/backends.py:633, in _dispatchable.__call__(self, backend, *args, **kwargs) 628 """Returns the result of the original function, or the backend function if 629 the backend is specified and that backend implements `func`.""" 631 if not backends: 632 # Fast path if no backends are installed --> 633 return self.orig_func(*args, **kwargs) 635 # Use `backend_name` in this function instead of `backend` 636 backend_name = backend File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/algorithms/flow/edmondskarp.py:238, in edmonds_karp(G, s, t, capacity, residual, value_only, cutoff) 120 @nx._dispatchable(edge_attrs={"capacity": float("inf")}, returns_graph=True) 121 def edmonds_karp( 122 G, s, t, capacity="capacity", residual=None, value_only=False, cutoff=None 123 ): 124 """Find a maximum single-commodity flow using the Edmonds-Karp algorithm. 125 126 This function returns the residual network resulting after computing (...) 236 237 """ --> 238 R = edmonds_karp_impl(G, s, t, capacity, residual, cutoff) 239 R.graph["algorithm"] = "edmonds_karp" 240 nx._clear_cache(R) File ~/SJSU/276/276-ML-on-Graphs/.venv/lib/python3.12/site-packages/networkx/algorithms/flow/edmondskarp.py:110, in edmonds_karp_impl(G, s, t, capacity, residual, cutoff) 108 # Initialize/reset the residual network. 109 for u in R: --> 110 for e in R[u].values(): 111 e["flow"] = 0 113 if cutoff is None: File <frozen _collections_abc>:913, in __iter__(self) KeyboardInterrupt:
nx.omega(G)